Left Termination of the query pattern rem_in_3(g, a, g) w.r.t. the given Prolog program could not be shown:



Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof

Clauses:

rem(X, Y, R) :- ','(notZero(Y), ','(sub(X, Y, Z), rem(Z, Y, R))).
rem(X, Y, X) :- ','(notZero(Y), geq(X, Y)).
sub(s(X), s(Y), Z) :- sub(X, Y, Z).
sub(X, 0, X).
notZero(s(X)).
geq(s(X), s(Y)) :- geq(X, Y).
geq(X, 0).

Queries:

rem(g,a,g).

We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
rem_in: (b,f,b) (f,b,b)
sub_in: (b,b,f) (f,f,f) (f,b,f)
geq_in: (b,b) (f,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

rem_in_gag(X, Y, R) → U1_gag(X, Y, R, notZero_in_a(Y))
notZero_in_a(s(X)) → notZero_out_a(s(X))
U1_gag(X, Y, R, notZero_out_a(Y)) → U2_gag(X, Y, R, sub_in_gga(X, Y, Z))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(s(X), s(Y), Z) → U6_aaa(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(X, 0, X) → sub_out_aaa(X, 0, X)
U6_aaa(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aaa(s(X), s(Y), Z)
U6_gga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U2_gag(X, Y, R, sub_out_gga(X, Y, Z)) → U3_gag(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, R) → U1_agg(X, Y, R, notZero_in_g(Y))
notZero_in_g(s(X)) → notZero_out_g(s(X))
U1_agg(X, Y, R, notZero_out_g(Y)) → U2_agg(X, Y, R, sub_in_aga(X, Y, Z))
sub_in_aga(s(X), s(Y), Z) → U6_aga(X, Y, Z, sub_in_aaa(X, Y, Z))
U6_aga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aga(s(X), s(Y), Z)
sub_in_aga(X, 0, X) → sub_out_aga(X, 0, X)
U2_agg(X, Y, R, sub_out_aga(X, Y, Z)) → U3_agg(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, X) → U4_agg(X, Y, notZero_in_g(Y))
U4_agg(X, Y, notZero_out_g(Y)) → U5_agg(X, Y, geq_in_gg(X, Y))
geq_in_gg(s(X), s(Y)) → U7_gg(X, Y, geq_in_aa(X, Y))
geq_in_aa(s(X), s(Y)) → U7_aa(X, Y, geq_in_aa(X, Y))
geq_in_aa(X, 0) → geq_out_aa(X, 0)
U7_aa(X, Y, geq_out_aa(X, Y)) → geq_out_aa(s(X), s(Y))
U7_gg(X, Y, geq_out_aa(X, Y)) → geq_out_gg(s(X), s(Y))
geq_in_gg(X, 0) → geq_out_gg(X, 0)
U5_agg(X, Y, geq_out_gg(X, Y)) → rem_out_agg(X, Y, X)
U3_agg(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_agg(X, Y, R)
U3_gag(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_gag(X, Y, R)
rem_in_gag(X, Y, X) → U4_gag(X, Y, notZero_in_a(Y))
U4_gag(X, Y, notZero_out_a(Y)) → U5_gag(X, Y, geq_in_gg(X, Y))
U5_gag(X, Y, geq_out_gg(X, Y)) → rem_out_gag(X, Y, X)

The argument filtering Pi contains the following mapping:
rem_in_gag(x1, x2, x3)  =  rem_in_gag(x1, x3)
U1_gag(x1, x2, x3, x4)  =  U1_gag(x1, x3, x4)
notZero_in_a(x1)  =  notZero_in_a
notZero_out_a(x1)  =  notZero_out_a(x1)
s(x1)  =  s
U2_gag(x1, x2, x3, x4)  =  U2_gag(x2, x3, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_in_aaa(x1, x2, x3)  =  sub_in_aaa
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
sub_out_aaa(x1, x2, x3)  =  sub_out_aaa(x2)
sub_out_gga(x1, x2, x3)  =  sub_out_gga
0  =  0
U3_gag(x1, x2, x3, x4)  =  U3_gag(x2, x4)
rem_in_agg(x1, x2, x3)  =  rem_in_agg(x2, x3)
U1_agg(x1, x2, x3, x4)  =  U1_agg(x2, x3, x4)
notZero_in_g(x1)  =  notZero_in_g(x1)
notZero_out_g(x1)  =  notZero_out_g
U2_agg(x1, x2, x3, x4)  =  U2_agg(x2, x3, x4)
sub_in_aga(x1, x2, x3)  =  sub_in_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
sub_out_aga(x1, x2, x3)  =  sub_out_aga
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
U4_agg(x1, x2, x3)  =  U4_agg(x1, x2, x3)
U5_agg(x1, x2, x3)  =  U5_agg(x3)
geq_in_gg(x1, x2)  =  geq_in_gg(x1, x2)
U7_gg(x1, x2, x3)  =  U7_gg(x3)
geq_in_aa(x1, x2)  =  geq_in_aa
U7_aa(x1, x2, x3)  =  U7_aa(x3)
geq_out_aa(x1, x2)  =  geq_out_aa(x2)
geq_out_gg(x1, x2)  =  geq_out_gg
rem_out_agg(x1, x2, x3)  =  rem_out_agg
rem_out_gag(x1, x2, x3)  =  rem_out_gag(x2)
U4_gag(x1, x2, x3)  =  U4_gag(x1, x3)
U5_gag(x1, x2, x3)  =  U5_gag(x2, x3)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof
  ↳ PrologToPiTRSProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

rem_in_gag(X, Y, R) → U1_gag(X, Y, R, notZero_in_a(Y))
notZero_in_a(s(X)) → notZero_out_a(s(X))
U1_gag(X, Y, R, notZero_out_a(Y)) → U2_gag(X, Y, R, sub_in_gga(X, Y, Z))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(s(X), s(Y), Z) → U6_aaa(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(X, 0, X) → sub_out_aaa(X, 0, X)
U6_aaa(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aaa(s(X), s(Y), Z)
U6_gga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U2_gag(X, Y, R, sub_out_gga(X, Y, Z)) → U3_gag(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, R) → U1_agg(X, Y, R, notZero_in_g(Y))
notZero_in_g(s(X)) → notZero_out_g(s(X))
U1_agg(X, Y, R, notZero_out_g(Y)) → U2_agg(X, Y, R, sub_in_aga(X, Y, Z))
sub_in_aga(s(X), s(Y), Z) → U6_aga(X, Y, Z, sub_in_aaa(X, Y, Z))
U6_aga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aga(s(X), s(Y), Z)
sub_in_aga(X, 0, X) → sub_out_aga(X, 0, X)
U2_agg(X, Y, R, sub_out_aga(X, Y, Z)) → U3_agg(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, X) → U4_agg(X, Y, notZero_in_g(Y))
U4_agg(X, Y, notZero_out_g(Y)) → U5_agg(X, Y, geq_in_gg(X, Y))
geq_in_gg(s(X), s(Y)) → U7_gg(X, Y, geq_in_aa(X, Y))
geq_in_aa(s(X), s(Y)) → U7_aa(X, Y, geq_in_aa(X, Y))
geq_in_aa(X, 0) → geq_out_aa(X, 0)
U7_aa(X, Y, geq_out_aa(X, Y)) → geq_out_aa(s(X), s(Y))
U7_gg(X, Y, geq_out_aa(X, Y)) → geq_out_gg(s(X), s(Y))
geq_in_gg(X, 0) → geq_out_gg(X, 0)
U5_agg(X, Y, geq_out_gg(X, Y)) → rem_out_agg(X, Y, X)
U3_agg(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_agg(X, Y, R)
U3_gag(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_gag(X, Y, R)
rem_in_gag(X, Y, X) → U4_gag(X, Y, notZero_in_a(Y))
U4_gag(X, Y, notZero_out_a(Y)) → U5_gag(X, Y, geq_in_gg(X, Y))
U5_gag(X, Y, geq_out_gg(X, Y)) → rem_out_gag(X, Y, X)

The argument filtering Pi contains the following mapping:
rem_in_gag(x1, x2, x3)  =  rem_in_gag(x1, x3)
U1_gag(x1, x2, x3, x4)  =  U1_gag(x1, x3, x4)
notZero_in_a(x1)  =  notZero_in_a
notZero_out_a(x1)  =  notZero_out_a(x1)
s(x1)  =  s
U2_gag(x1, x2, x3, x4)  =  U2_gag(x2, x3, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_in_aaa(x1, x2, x3)  =  sub_in_aaa
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
sub_out_aaa(x1, x2, x3)  =  sub_out_aaa(x2)
sub_out_gga(x1, x2, x3)  =  sub_out_gga
0  =  0
U3_gag(x1, x2, x3, x4)  =  U3_gag(x2, x4)
rem_in_agg(x1, x2, x3)  =  rem_in_agg(x2, x3)
U1_agg(x1, x2, x3, x4)  =  U1_agg(x2, x3, x4)
notZero_in_g(x1)  =  notZero_in_g(x1)
notZero_out_g(x1)  =  notZero_out_g
U2_agg(x1, x2, x3, x4)  =  U2_agg(x2, x3, x4)
sub_in_aga(x1, x2, x3)  =  sub_in_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
sub_out_aga(x1, x2, x3)  =  sub_out_aga
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
U4_agg(x1, x2, x3)  =  U4_agg(x1, x2, x3)
U5_agg(x1, x2, x3)  =  U5_agg(x3)
geq_in_gg(x1, x2)  =  geq_in_gg(x1, x2)
U7_gg(x1, x2, x3)  =  U7_gg(x3)
geq_in_aa(x1, x2)  =  geq_in_aa
U7_aa(x1, x2, x3)  =  U7_aa(x3)
geq_out_aa(x1, x2)  =  geq_out_aa(x2)
geq_out_gg(x1, x2)  =  geq_out_gg
rem_out_agg(x1, x2, x3)  =  rem_out_agg
rem_out_gag(x1, x2, x3)  =  rem_out_gag(x2)
U4_gag(x1, x2, x3)  =  U4_gag(x1, x3)
U5_gag(x1, x2, x3)  =  U5_gag(x2, x3)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

REM_IN_GAG(X, Y, R) → U1_GAG(X, Y, R, notZero_in_a(Y))
REM_IN_GAG(X, Y, R) → NOTZERO_IN_A(Y)
U1_GAG(X, Y, R, notZero_out_a(Y)) → U2_GAG(X, Y, R, sub_in_gga(X, Y, Z))
U1_GAG(X, Y, R, notZero_out_a(Y)) → SUB_IN_GGA(X, Y, Z)
SUB_IN_GGA(s(X), s(Y), Z) → U6_GGA(X, Y, Z, sub_in_aaa(X, Y, Z))
SUB_IN_GGA(s(X), s(Y), Z) → SUB_IN_AAA(X, Y, Z)
SUB_IN_AAA(s(X), s(Y), Z) → U6_AAA(X, Y, Z, sub_in_aaa(X, Y, Z))
SUB_IN_AAA(s(X), s(Y), Z) → SUB_IN_AAA(X, Y, Z)
U2_GAG(X, Y, R, sub_out_gga(X, Y, Z)) → U3_GAG(X, Y, R, rem_in_agg(Z, Y, R))
U2_GAG(X, Y, R, sub_out_gga(X, Y, Z)) → REM_IN_AGG(Z, Y, R)
REM_IN_AGG(X, Y, R) → U1_AGG(X, Y, R, notZero_in_g(Y))
REM_IN_AGG(X, Y, R) → NOTZERO_IN_G(Y)
U1_AGG(X, Y, R, notZero_out_g(Y)) → U2_AGG(X, Y, R, sub_in_aga(X, Y, Z))
U1_AGG(X, Y, R, notZero_out_g(Y)) → SUB_IN_AGA(X, Y, Z)
SUB_IN_AGA(s(X), s(Y), Z) → U6_AGA(X, Y, Z, sub_in_aaa(X, Y, Z))
SUB_IN_AGA(s(X), s(Y), Z) → SUB_IN_AAA(X, Y, Z)
U2_AGG(X, Y, R, sub_out_aga(X, Y, Z)) → U3_AGG(X, Y, R, rem_in_agg(Z, Y, R))
U2_AGG(X, Y, R, sub_out_aga(X, Y, Z)) → REM_IN_AGG(Z, Y, R)
REM_IN_AGG(X, Y, X) → U4_AGG(X, Y, notZero_in_g(Y))
REM_IN_AGG(X, Y, X) → NOTZERO_IN_G(Y)
U4_AGG(X, Y, notZero_out_g(Y)) → U5_AGG(X, Y, geq_in_gg(X, Y))
U4_AGG(X, Y, notZero_out_g(Y)) → GEQ_IN_GG(X, Y)
GEQ_IN_GG(s(X), s(Y)) → U7_GG(X, Y, geq_in_aa(X, Y))
GEQ_IN_GG(s(X), s(Y)) → GEQ_IN_AA(X, Y)
GEQ_IN_AA(s(X), s(Y)) → U7_AA(X, Y, geq_in_aa(X, Y))
GEQ_IN_AA(s(X), s(Y)) → GEQ_IN_AA(X, Y)
REM_IN_GAG(X, Y, X) → U4_GAG(X, Y, notZero_in_a(Y))
REM_IN_GAG(X, Y, X) → NOTZERO_IN_A(Y)
U4_GAG(X, Y, notZero_out_a(Y)) → U5_GAG(X, Y, geq_in_gg(X, Y))
U4_GAG(X, Y, notZero_out_a(Y)) → GEQ_IN_GG(X, Y)

The TRS R consists of the following rules:

rem_in_gag(X, Y, R) → U1_gag(X, Y, R, notZero_in_a(Y))
notZero_in_a(s(X)) → notZero_out_a(s(X))
U1_gag(X, Y, R, notZero_out_a(Y)) → U2_gag(X, Y, R, sub_in_gga(X, Y, Z))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(s(X), s(Y), Z) → U6_aaa(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(X, 0, X) → sub_out_aaa(X, 0, X)
U6_aaa(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aaa(s(X), s(Y), Z)
U6_gga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U2_gag(X, Y, R, sub_out_gga(X, Y, Z)) → U3_gag(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, R) → U1_agg(X, Y, R, notZero_in_g(Y))
notZero_in_g(s(X)) → notZero_out_g(s(X))
U1_agg(X, Y, R, notZero_out_g(Y)) → U2_agg(X, Y, R, sub_in_aga(X, Y, Z))
sub_in_aga(s(X), s(Y), Z) → U6_aga(X, Y, Z, sub_in_aaa(X, Y, Z))
U6_aga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aga(s(X), s(Y), Z)
sub_in_aga(X, 0, X) → sub_out_aga(X, 0, X)
U2_agg(X, Y, R, sub_out_aga(X, Y, Z)) → U3_agg(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, X) → U4_agg(X, Y, notZero_in_g(Y))
U4_agg(X, Y, notZero_out_g(Y)) → U5_agg(X, Y, geq_in_gg(X, Y))
geq_in_gg(s(X), s(Y)) → U7_gg(X, Y, geq_in_aa(X, Y))
geq_in_aa(s(X), s(Y)) → U7_aa(X, Y, geq_in_aa(X, Y))
geq_in_aa(X, 0) → geq_out_aa(X, 0)
U7_aa(X, Y, geq_out_aa(X, Y)) → geq_out_aa(s(X), s(Y))
U7_gg(X, Y, geq_out_aa(X, Y)) → geq_out_gg(s(X), s(Y))
geq_in_gg(X, 0) → geq_out_gg(X, 0)
U5_agg(X, Y, geq_out_gg(X, Y)) → rem_out_agg(X, Y, X)
U3_agg(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_agg(X, Y, R)
U3_gag(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_gag(X, Y, R)
rem_in_gag(X, Y, X) → U4_gag(X, Y, notZero_in_a(Y))
U4_gag(X, Y, notZero_out_a(Y)) → U5_gag(X, Y, geq_in_gg(X, Y))
U5_gag(X, Y, geq_out_gg(X, Y)) → rem_out_gag(X, Y, X)

The argument filtering Pi contains the following mapping:
rem_in_gag(x1, x2, x3)  =  rem_in_gag(x1, x3)
U1_gag(x1, x2, x3, x4)  =  U1_gag(x1, x3, x4)
notZero_in_a(x1)  =  notZero_in_a
notZero_out_a(x1)  =  notZero_out_a(x1)
s(x1)  =  s
U2_gag(x1, x2, x3, x4)  =  U2_gag(x2, x3, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_in_aaa(x1, x2, x3)  =  sub_in_aaa
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
sub_out_aaa(x1, x2, x3)  =  sub_out_aaa(x2)
sub_out_gga(x1, x2, x3)  =  sub_out_gga
0  =  0
U3_gag(x1, x2, x3, x4)  =  U3_gag(x2, x4)
rem_in_agg(x1, x2, x3)  =  rem_in_agg(x2, x3)
U1_agg(x1, x2, x3, x4)  =  U1_agg(x2, x3, x4)
notZero_in_g(x1)  =  notZero_in_g(x1)
notZero_out_g(x1)  =  notZero_out_g
U2_agg(x1, x2, x3, x4)  =  U2_agg(x2, x3, x4)
sub_in_aga(x1, x2, x3)  =  sub_in_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
sub_out_aga(x1, x2, x3)  =  sub_out_aga
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
U4_agg(x1, x2, x3)  =  U4_agg(x1, x2, x3)
U5_agg(x1, x2, x3)  =  U5_agg(x3)
geq_in_gg(x1, x2)  =  geq_in_gg(x1, x2)
U7_gg(x1, x2, x3)  =  U7_gg(x3)
geq_in_aa(x1, x2)  =  geq_in_aa
U7_aa(x1, x2, x3)  =  U7_aa(x3)
geq_out_aa(x1, x2)  =  geq_out_aa(x2)
geq_out_gg(x1, x2)  =  geq_out_gg
rem_out_agg(x1, x2, x3)  =  rem_out_agg
rem_out_gag(x1, x2, x3)  =  rem_out_gag(x2)
U4_gag(x1, x2, x3)  =  U4_gag(x1, x3)
U5_gag(x1, x2, x3)  =  U5_gag(x2, x3)
U3_AGG(x1, x2, x3, x4)  =  U3_AGG(x4)
U4_AGG(x1, x2, x3)  =  U4_AGG(x1, x2, x3)
GEQ_IN_AA(x1, x2)  =  GEQ_IN_AA
U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x4)
U3_GAG(x1, x2, x3, x4)  =  U3_GAG(x2, x4)
U5_GAG(x1, x2, x3)  =  U5_GAG(x2, x3)
U6_AAA(x1, x2, x3, x4)  =  U6_AAA(x4)
U2_AGG(x1, x2, x3, x4)  =  U2_AGG(x2, x3, x4)
GEQ_IN_GG(x1, x2)  =  GEQ_IN_GG(x1, x2)
SUB_IN_AGA(x1, x2, x3)  =  SUB_IN_AGA(x2)
NOTZERO_IN_A(x1)  =  NOTZERO_IN_A
REM_IN_GAG(x1, x2, x3)  =  REM_IN_GAG(x1, x3)
SUB_IN_AAA(x1, x2, x3)  =  SUB_IN_AAA
SUB_IN_GGA(x1, x2, x3)  =  SUB_IN_GGA(x1, x2)
REM_IN_AGG(x1, x2, x3)  =  REM_IN_AGG(x2, x3)
U1_AGG(x1, x2, x3, x4)  =  U1_AGG(x2, x3, x4)
U7_AA(x1, x2, x3)  =  U7_AA(x3)
U2_GAG(x1, x2, x3, x4)  =  U2_GAG(x2, x3, x4)
U6_AGA(x1, x2, x3, x4)  =  U6_AGA(x4)
NOTZERO_IN_G(x1)  =  NOTZERO_IN_G(x1)
U5_AGG(x1, x2, x3)  =  U5_AGG(x3)
U4_GAG(x1, x2, x3)  =  U4_GAG(x1, x3)
U1_GAG(x1, x2, x3, x4)  =  U1_GAG(x1, x3, x4)
U7_GG(x1, x2, x3)  =  U7_GG(x3)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

REM_IN_GAG(X, Y, R) → U1_GAG(X, Y, R, notZero_in_a(Y))
REM_IN_GAG(X, Y, R) → NOTZERO_IN_A(Y)
U1_GAG(X, Y, R, notZero_out_a(Y)) → U2_GAG(X, Y, R, sub_in_gga(X, Y, Z))
U1_GAG(X, Y, R, notZero_out_a(Y)) → SUB_IN_GGA(X, Y, Z)
SUB_IN_GGA(s(X), s(Y), Z) → U6_GGA(X, Y, Z, sub_in_aaa(X, Y, Z))
SUB_IN_GGA(s(X), s(Y), Z) → SUB_IN_AAA(X, Y, Z)
SUB_IN_AAA(s(X), s(Y), Z) → U6_AAA(X, Y, Z, sub_in_aaa(X, Y, Z))
SUB_IN_AAA(s(X), s(Y), Z) → SUB_IN_AAA(X, Y, Z)
U2_GAG(X, Y, R, sub_out_gga(X, Y, Z)) → U3_GAG(X, Y, R, rem_in_agg(Z, Y, R))
U2_GAG(X, Y, R, sub_out_gga(X, Y, Z)) → REM_IN_AGG(Z, Y, R)
REM_IN_AGG(X, Y, R) → U1_AGG(X, Y, R, notZero_in_g(Y))
REM_IN_AGG(X, Y, R) → NOTZERO_IN_G(Y)
U1_AGG(X, Y, R, notZero_out_g(Y)) → U2_AGG(X, Y, R, sub_in_aga(X, Y, Z))
U1_AGG(X, Y, R, notZero_out_g(Y)) → SUB_IN_AGA(X, Y, Z)
SUB_IN_AGA(s(X), s(Y), Z) → U6_AGA(X, Y, Z, sub_in_aaa(X, Y, Z))
SUB_IN_AGA(s(X), s(Y), Z) → SUB_IN_AAA(X, Y, Z)
U2_AGG(X, Y, R, sub_out_aga(X, Y, Z)) → U3_AGG(X, Y, R, rem_in_agg(Z, Y, R))
U2_AGG(X, Y, R, sub_out_aga(X, Y, Z)) → REM_IN_AGG(Z, Y, R)
REM_IN_AGG(X, Y, X) → U4_AGG(X, Y, notZero_in_g(Y))
REM_IN_AGG(X, Y, X) → NOTZERO_IN_G(Y)
U4_AGG(X, Y, notZero_out_g(Y)) → U5_AGG(X, Y, geq_in_gg(X, Y))
U4_AGG(X, Y, notZero_out_g(Y)) → GEQ_IN_GG(X, Y)
GEQ_IN_GG(s(X), s(Y)) → U7_GG(X, Y, geq_in_aa(X, Y))
GEQ_IN_GG(s(X), s(Y)) → GEQ_IN_AA(X, Y)
GEQ_IN_AA(s(X), s(Y)) → U7_AA(X, Y, geq_in_aa(X, Y))
GEQ_IN_AA(s(X), s(Y)) → GEQ_IN_AA(X, Y)
REM_IN_GAG(X, Y, X) → U4_GAG(X, Y, notZero_in_a(Y))
REM_IN_GAG(X, Y, X) → NOTZERO_IN_A(Y)
U4_GAG(X, Y, notZero_out_a(Y)) → U5_GAG(X, Y, geq_in_gg(X, Y))
U4_GAG(X, Y, notZero_out_a(Y)) → GEQ_IN_GG(X, Y)

The TRS R consists of the following rules:

rem_in_gag(X, Y, R) → U1_gag(X, Y, R, notZero_in_a(Y))
notZero_in_a(s(X)) → notZero_out_a(s(X))
U1_gag(X, Y, R, notZero_out_a(Y)) → U2_gag(X, Y, R, sub_in_gga(X, Y, Z))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(s(X), s(Y), Z) → U6_aaa(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(X, 0, X) → sub_out_aaa(X, 0, X)
U6_aaa(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aaa(s(X), s(Y), Z)
U6_gga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U2_gag(X, Y, R, sub_out_gga(X, Y, Z)) → U3_gag(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, R) → U1_agg(X, Y, R, notZero_in_g(Y))
notZero_in_g(s(X)) → notZero_out_g(s(X))
U1_agg(X, Y, R, notZero_out_g(Y)) → U2_agg(X, Y, R, sub_in_aga(X, Y, Z))
sub_in_aga(s(X), s(Y), Z) → U6_aga(X, Y, Z, sub_in_aaa(X, Y, Z))
U6_aga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aga(s(X), s(Y), Z)
sub_in_aga(X, 0, X) → sub_out_aga(X, 0, X)
U2_agg(X, Y, R, sub_out_aga(X, Y, Z)) → U3_agg(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, X) → U4_agg(X, Y, notZero_in_g(Y))
U4_agg(X, Y, notZero_out_g(Y)) → U5_agg(X, Y, geq_in_gg(X, Y))
geq_in_gg(s(X), s(Y)) → U7_gg(X, Y, geq_in_aa(X, Y))
geq_in_aa(s(X), s(Y)) → U7_aa(X, Y, geq_in_aa(X, Y))
geq_in_aa(X, 0) → geq_out_aa(X, 0)
U7_aa(X, Y, geq_out_aa(X, Y)) → geq_out_aa(s(X), s(Y))
U7_gg(X, Y, geq_out_aa(X, Y)) → geq_out_gg(s(X), s(Y))
geq_in_gg(X, 0) → geq_out_gg(X, 0)
U5_agg(X, Y, geq_out_gg(X, Y)) → rem_out_agg(X, Y, X)
U3_agg(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_agg(X, Y, R)
U3_gag(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_gag(X, Y, R)
rem_in_gag(X, Y, X) → U4_gag(X, Y, notZero_in_a(Y))
U4_gag(X, Y, notZero_out_a(Y)) → U5_gag(X, Y, geq_in_gg(X, Y))
U5_gag(X, Y, geq_out_gg(X, Y)) → rem_out_gag(X, Y, X)

The argument filtering Pi contains the following mapping:
rem_in_gag(x1, x2, x3)  =  rem_in_gag(x1, x3)
U1_gag(x1, x2, x3, x4)  =  U1_gag(x1, x3, x4)
notZero_in_a(x1)  =  notZero_in_a
notZero_out_a(x1)  =  notZero_out_a(x1)
s(x1)  =  s
U2_gag(x1, x2, x3, x4)  =  U2_gag(x2, x3, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_in_aaa(x1, x2, x3)  =  sub_in_aaa
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
sub_out_aaa(x1, x2, x3)  =  sub_out_aaa(x2)
sub_out_gga(x1, x2, x3)  =  sub_out_gga
0  =  0
U3_gag(x1, x2, x3, x4)  =  U3_gag(x2, x4)
rem_in_agg(x1, x2, x3)  =  rem_in_agg(x2, x3)
U1_agg(x1, x2, x3, x4)  =  U1_agg(x2, x3, x4)
notZero_in_g(x1)  =  notZero_in_g(x1)
notZero_out_g(x1)  =  notZero_out_g
U2_agg(x1, x2, x3, x4)  =  U2_agg(x2, x3, x4)
sub_in_aga(x1, x2, x3)  =  sub_in_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
sub_out_aga(x1, x2, x3)  =  sub_out_aga
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
U4_agg(x1, x2, x3)  =  U4_agg(x1, x2, x3)
U5_agg(x1, x2, x3)  =  U5_agg(x3)
geq_in_gg(x1, x2)  =  geq_in_gg(x1, x2)
U7_gg(x1, x2, x3)  =  U7_gg(x3)
geq_in_aa(x1, x2)  =  geq_in_aa
U7_aa(x1, x2, x3)  =  U7_aa(x3)
geq_out_aa(x1, x2)  =  geq_out_aa(x2)
geq_out_gg(x1, x2)  =  geq_out_gg
rem_out_agg(x1, x2, x3)  =  rem_out_agg
rem_out_gag(x1, x2, x3)  =  rem_out_gag(x2)
U4_gag(x1, x2, x3)  =  U4_gag(x1, x3)
U5_gag(x1, x2, x3)  =  U5_gag(x2, x3)
U3_AGG(x1, x2, x3, x4)  =  U3_AGG(x4)
U4_AGG(x1, x2, x3)  =  U4_AGG(x1, x2, x3)
GEQ_IN_AA(x1, x2)  =  GEQ_IN_AA
U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x4)
U3_GAG(x1, x2, x3, x4)  =  U3_GAG(x2, x4)
U5_GAG(x1, x2, x3)  =  U5_GAG(x2, x3)
U6_AAA(x1, x2, x3, x4)  =  U6_AAA(x4)
U2_AGG(x1, x2, x3, x4)  =  U2_AGG(x2, x3, x4)
GEQ_IN_GG(x1, x2)  =  GEQ_IN_GG(x1, x2)
SUB_IN_AGA(x1, x2, x3)  =  SUB_IN_AGA(x2)
NOTZERO_IN_A(x1)  =  NOTZERO_IN_A
REM_IN_GAG(x1, x2, x3)  =  REM_IN_GAG(x1, x3)
SUB_IN_AAA(x1, x2, x3)  =  SUB_IN_AAA
SUB_IN_GGA(x1, x2, x3)  =  SUB_IN_GGA(x1, x2)
REM_IN_AGG(x1, x2, x3)  =  REM_IN_AGG(x2, x3)
U1_AGG(x1, x2, x3, x4)  =  U1_AGG(x2, x3, x4)
U7_AA(x1, x2, x3)  =  U7_AA(x3)
U2_GAG(x1, x2, x3, x4)  =  U2_GAG(x2, x3, x4)
U6_AGA(x1, x2, x3, x4)  =  U6_AGA(x4)
NOTZERO_IN_G(x1)  =  NOTZERO_IN_G(x1)
U5_AGG(x1, x2, x3)  =  U5_AGG(x3)
U4_GAG(x1, x2, x3)  =  U4_GAG(x1, x3)
U1_GAG(x1, x2, x3, x4)  =  U1_GAG(x1, x3, x4)
U7_GG(x1, x2, x3)  =  U7_GG(x3)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 3 SCCs with 25 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

GEQ_IN_AA(s(X), s(Y)) → GEQ_IN_AA(X, Y)

The TRS R consists of the following rules:

rem_in_gag(X, Y, R) → U1_gag(X, Y, R, notZero_in_a(Y))
notZero_in_a(s(X)) → notZero_out_a(s(X))
U1_gag(X, Y, R, notZero_out_a(Y)) → U2_gag(X, Y, R, sub_in_gga(X, Y, Z))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(s(X), s(Y), Z) → U6_aaa(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(X, 0, X) → sub_out_aaa(X, 0, X)
U6_aaa(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aaa(s(X), s(Y), Z)
U6_gga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U2_gag(X, Y, R, sub_out_gga(X, Y, Z)) → U3_gag(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, R) → U1_agg(X, Y, R, notZero_in_g(Y))
notZero_in_g(s(X)) → notZero_out_g(s(X))
U1_agg(X, Y, R, notZero_out_g(Y)) → U2_agg(X, Y, R, sub_in_aga(X, Y, Z))
sub_in_aga(s(X), s(Y), Z) → U6_aga(X, Y, Z, sub_in_aaa(X, Y, Z))
U6_aga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aga(s(X), s(Y), Z)
sub_in_aga(X, 0, X) → sub_out_aga(X, 0, X)
U2_agg(X, Y, R, sub_out_aga(X, Y, Z)) → U3_agg(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, X) → U4_agg(X, Y, notZero_in_g(Y))
U4_agg(X, Y, notZero_out_g(Y)) → U5_agg(X, Y, geq_in_gg(X, Y))
geq_in_gg(s(X), s(Y)) → U7_gg(X, Y, geq_in_aa(X, Y))
geq_in_aa(s(X), s(Y)) → U7_aa(X, Y, geq_in_aa(X, Y))
geq_in_aa(X, 0) → geq_out_aa(X, 0)
U7_aa(X, Y, geq_out_aa(X, Y)) → geq_out_aa(s(X), s(Y))
U7_gg(X, Y, geq_out_aa(X, Y)) → geq_out_gg(s(X), s(Y))
geq_in_gg(X, 0) → geq_out_gg(X, 0)
U5_agg(X, Y, geq_out_gg(X, Y)) → rem_out_agg(X, Y, X)
U3_agg(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_agg(X, Y, R)
U3_gag(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_gag(X, Y, R)
rem_in_gag(X, Y, X) → U4_gag(X, Y, notZero_in_a(Y))
U4_gag(X, Y, notZero_out_a(Y)) → U5_gag(X, Y, geq_in_gg(X, Y))
U5_gag(X, Y, geq_out_gg(X, Y)) → rem_out_gag(X, Y, X)

The argument filtering Pi contains the following mapping:
rem_in_gag(x1, x2, x3)  =  rem_in_gag(x1, x3)
U1_gag(x1, x2, x3, x4)  =  U1_gag(x1, x3, x4)
notZero_in_a(x1)  =  notZero_in_a
notZero_out_a(x1)  =  notZero_out_a(x1)
s(x1)  =  s
U2_gag(x1, x2, x3, x4)  =  U2_gag(x2, x3, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_in_aaa(x1, x2, x3)  =  sub_in_aaa
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
sub_out_aaa(x1, x2, x3)  =  sub_out_aaa(x2)
sub_out_gga(x1, x2, x3)  =  sub_out_gga
0  =  0
U3_gag(x1, x2, x3, x4)  =  U3_gag(x2, x4)
rem_in_agg(x1, x2, x3)  =  rem_in_agg(x2, x3)
U1_agg(x1, x2, x3, x4)  =  U1_agg(x2, x3, x4)
notZero_in_g(x1)  =  notZero_in_g(x1)
notZero_out_g(x1)  =  notZero_out_g
U2_agg(x1, x2, x3, x4)  =  U2_agg(x2, x3, x4)
sub_in_aga(x1, x2, x3)  =  sub_in_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
sub_out_aga(x1, x2, x3)  =  sub_out_aga
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
U4_agg(x1, x2, x3)  =  U4_agg(x1, x2, x3)
U5_agg(x1, x2, x3)  =  U5_agg(x3)
geq_in_gg(x1, x2)  =  geq_in_gg(x1, x2)
U7_gg(x1, x2, x3)  =  U7_gg(x3)
geq_in_aa(x1, x2)  =  geq_in_aa
U7_aa(x1, x2, x3)  =  U7_aa(x3)
geq_out_aa(x1, x2)  =  geq_out_aa(x2)
geq_out_gg(x1, x2)  =  geq_out_gg
rem_out_agg(x1, x2, x3)  =  rem_out_agg
rem_out_gag(x1, x2, x3)  =  rem_out_gag(x2)
U4_gag(x1, x2, x3)  =  U4_gag(x1, x3)
U5_gag(x1, x2, x3)  =  U5_gag(x2, x3)
GEQ_IN_AA(x1, x2)  =  GEQ_IN_AA

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

GEQ_IN_AA(s(X), s(Y)) → GEQ_IN_AA(X, Y)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s
GEQ_IN_AA(x1, x2)  =  GEQ_IN_AA

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

GEQ_IN_AAGEQ_IN_AA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

GEQ_IN_AAGEQ_IN_AA

The TRS R consists of the following rules:none


s = GEQ_IN_AA evaluates to t =GEQ_IN_AA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from GEQ_IN_AA to GEQ_IN_AA.





↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

SUB_IN_AAA(s(X), s(Y), Z) → SUB_IN_AAA(X, Y, Z)

The TRS R consists of the following rules:

rem_in_gag(X, Y, R) → U1_gag(X, Y, R, notZero_in_a(Y))
notZero_in_a(s(X)) → notZero_out_a(s(X))
U1_gag(X, Y, R, notZero_out_a(Y)) → U2_gag(X, Y, R, sub_in_gga(X, Y, Z))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(s(X), s(Y), Z) → U6_aaa(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(X, 0, X) → sub_out_aaa(X, 0, X)
U6_aaa(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aaa(s(X), s(Y), Z)
U6_gga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U2_gag(X, Y, R, sub_out_gga(X, Y, Z)) → U3_gag(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, R) → U1_agg(X, Y, R, notZero_in_g(Y))
notZero_in_g(s(X)) → notZero_out_g(s(X))
U1_agg(X, Y, R, notZero_out_g(Y)) → U2_agg(X, Y, R, sub_in_aga(X, Y, Z))
sub_in_aga(s(X), s(Y), Z) → U6_aga(X, Y, Z, sub_in_aaa(X, Y, Z))
U6_aga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aga(s(X), s(Y), Z)
sub_in_aga(X, 0, X) → sub_out_aga(X, 0, X)
U2_agg(X, Y, R, sub_out_aga(X, Y, Z)) → U3_agg(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, X) → U4_agg(X, Y, notZero_in_g(Y))
U4_agg(X, Y, notZero_out_g(Y)) → U5_agg(X, Y, geq_in_gg(X, Y))
geq_in_gg(s(X), s(Y)) → U7_gg(X, Y, geq_in_aa(X, Y))
geq_in_aa(s(X), s(Y)) → U7_aa(X, Y, geq_in_aa(X, Y))
geq_in_aa(X, 0) → geq_out_aa(X, 0)
U7_aa(X, Y, geq_out_aa(X, Y)) → geq_out_aa(s(X), s(Y))
U7_gg(X, Y, geq_out_aa(X, Y)) → geq_out_gg(s(X), s(Y))
geq_in_gg(X, 0) → geq_out_gg(X, 0)
U5_agg(X, Y, geq_out_gg(X, Y)) → rem_out_agg(X, Y, X)
U3_agg(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_agg(X, Y, R)
U3_gag(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_gag(X, Y, R)
rem_in_gag(X, Y, X) → U4_gag(X, Y, notZero_in_a(Y))
U4_gag(X, Y, notZero_out_a(Y)) → U5_gag(X, Y, geq_in_gg(X, Y))
U5_gag(X, Y, geq_out_gg(X, Y)) → rem_out_gag(X, Y, X)

The argument filtering Pi contains the following mapping:
rem_in_gag(x1, x2, x3)  =  rem_in_gag(x1, x3)
U1_gag(x1, x2, x3, x4)  =  U1_gag(x1, x3, x4)
notZero_in_a(x1)  =  notZero_in_a
notZero_out_a(x1)  =  notZero_out_a(x1)
s(x1)  =  s
U2_gag(x1, x2, x3, x4)  =  U2_gag(x2, x3, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_in_aaa(x1, x2, x3)  =  sub_in_aaa
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
sub_out_aaa(x1, x2, x3)  =  sub_out_aaa(x2)
sub_out_gga(x1, x2, x3)  =  sub_out_gga
0  =  0
U3_gag(x1, x2, x3, x4)  =  U3_gag(x2, x4)
rem_in_agg(x1, x2, x3)  =  rem_in_agg(x2, x3)
U1_agg(x1, x2, x3, x4)  =  U1_agg(x2, x3, x4)
notZero_in_g(x1)  =  notZero_in_g(x1)
notZero_out_g(x1)  =  notZero_out_g
U2_agg(x1, x2, x3, x4)  =  U2_agg(x2, x3, x4)
sub_in_aga(x1, x2, x3)  =  sub_in_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
sub_out_aga(x1, x2, x3)  =  sub_out_aga
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
U4_agg(x1, x2, x3)  =  U4_agg(x1, x2, x3)
U5_agg(x1, x2, x3)  =  U5_agg(x3)
geq_in_gg(x1, x2)  =  geq_in_gg(x1, x2)
U7_gg(x1, x2, x3)  =  U7_gg(x3)
geq_in_aa(x1, x2)  =  geq_in_aa
U7_aa(x1, x2, x3)  =  U7_aa(x3)
geq_out_aa(x1, x2)  =  geq_out_aa(x2)
geq_out_gg(x1, x2)  =  geq_out_gg
rem_out_agg(x1, x2, x3)  =  rem_out_agg
rem_out_gag(x1, x2, x3)  =  rem_out_gag(x2)
U4_gag(x1, x2, x3)  =  U4_gag(x1, x3)
U5_gag(x1, x2, x3)  =  U5_gag(x2, x3)
SUB_IN_AAA(x1, x2, x3)  =  SUB_IN_AAA

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

SUB_IN_AAA(s(X), s(Y), Z) → SUB_IN_AAA(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s
SUB_IN_AAA(x1, x2, x3)  =  SUB_IN_AAA

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

SUB_IN_AAASUB_IN_AAA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

SUB_IN_AAASUB_IN_AAA

The TRS R consists of the following rules:none


s = SUB_IN_AAA evaluates to t =SUB_IN_AAA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from SUB_IN_AAA to SUB_IN_AAA.





↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

U1_AGG(X, Y, R, notZero_out_g(Y)) → U2_AGG(X, Y, R, sub_in_aga(X, Y, Z))
U2_AGG(X, Y, R, sub_out_aga(X, Y, Z)) → REM_IN_AGG(Z, Y, R)
REM_IN_AGG(X, Y, R) → U1_AGG(X, Y, R, notZero_in_g(Y))

The TRS R consists of the following rules:

rem_in_gag(X, Y, R) → U1_gag(X, Y, R, notZero_in_a(Y))
notZero_in_a(s(X)) → notZero_out_a(s(X))
U1_gag(X, Y, R, notZero_out_a(Y)) → U2_gag(X, Y, R, sub_in_gga(X, Y, Z))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(s(X), s(Y), Z) → U6_aaa(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(X, 0, X) → sub_out_aaa(X, 0, X)
U6_aaa(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aaa(s(X), s(Y), Z)
U6_gga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U2_gag(X, Y, R, sub_out_gga(X, Y, Z)) → U3_gag(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, R) → U1_agg(X, Y, R, notZero_in_g(Y))
notZero_in_g(s(X)) → notZero_out_g(s(X))
U1_agg(X, Y, R, notZero_out_g(Y)) → U2_agg(X, Y, R, sub_in_aga(X, Y, Z))
sub_in_aga(s(X), s(Y), Z) → U6_aga(X, Y, Z, sub_in_aaa(X, Y, Z))
U6_aga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aga(s(X), s(Y), Z)
sub_in_aga(X, 0, X) → sub_out_aga(X, 0, X)
U2_agg(X, Y, R, sub_out_aga(X, Y, Z)) → U3_agg(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, X) → U4_agg(X, Y, notZero_in_g(Y))
U4_agg(X, Y, notZero_out_g(Y)) → U5_agg(X, Y, geq_in_gg(X, Y))
geq_in_gg(s(X), s(Y)) → U7_gg(X, Y, geq_in_aa(X, Y))
geq_in_aa(s(X), s(Y)) → U7_aa(X, Y, geq_in_aa(X, Y))
geq_in_aa(X, 0) → geq_out_aa(X, 0)
U7_aa(X, Y, geq_out_aa(X, Y)) → geq_out_aa(s(X), s(Y))
U7_gg(X, Y, geq_out_aa(X, Y)) → geq_out_gg(s(X), s(Y))
geq_in_gg(X, 0) → geq_out_gg(X, 0)
U5_agg(X, Y, geq_out_gg(X, Y)) → rem_out_agg(X, Y, X)
U3_agg(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_agg(X, Y, R)
U3_gag(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_gag(X, Y, R)
rem_in_gag(X, Y, X) → U4_gag(X, Y, notZero_in_a(Y))
U4_gag(X, Y, notZero_out_a(Y)) → U5_gag(X, Y, geq_in_gg(X, Y))
U5_gag(X, Y, geq_out_gg(X, Y)) → rem_out_gag(X, Y, X)

The argument filtering Pi contains the following mapping:
rem_in_gag(x1, x2, x3)  =  rem_in_gag(x1, x3)
U1_gag(x1, x2, x3, x4)  =  U1_gag(x1, x3, x4)
notZero_in_a(x1)  =  notZero_in_a
notZero_out_a(x1)  =  notZero_out_a(x1)
s(x1)  =  s
U2_gag(x1, x2, x3, x4)  =  U2_gag(x2, x3, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_in_aaa(x1, x2, x3)  =  sub_in_aaa
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
sub_out_aaa(x1, x2, x3)  =  sub_out_aaa(x2)
sub_out_gga(x1, x2, x3)  =  sub_out_gga
0  =  0
U3_gag(x1, x2, x3, x4)  =  U3_gag(x2, x4)
rem_in_agg(x1, x2, x3)  =  rem_in_agg(x2, x3)
U1_agg(x1, x2, x3, x4)  =  U1_agg(x2, x3, x4)
notZero_in_g(x1)  =  notZero_in_g(x1)
notZero_out_g(x1)  =  notZero_out_g
U2_agg(x1, x2, x3, x4)  =  U2_agg(x2, x3, x4)
sub_in_aga(x1, x2, x3)  =  sub_in_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
sub_out_aga(x1, x2, x3)  =  sub_out_aga
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
U4_agg(x1, x2, x3)  =  U4_agg(x1, x2, x3)
U5_agg(x1, x2, x3)  =  U5_agg(x3)
geq_in_gg(x1, x2)  =  geq_in_gg(x1, x2)
U7_gg(x1, x2, x3)  =  U7_gg(x3)
geq_in_aa(x1, x2)  =  geq_in_aa
U7_aa(x1, x2, x3)  =  U7_aa(x3)
geq_out_aa(x1, x2)  =  geq_out_aa(x2)
geq_out_gg(x1, x2)  =  geq_out_gg
rem_out_agg(x1, x2, x3)  =  rem_out_agg
rem_out_gag(x1, x2, x3)  =  rem_out_gag(x2)
U4_gag(x1, x2, x3)  =  U4_gag(x1, x3)
U5_gag(x1, x2, x3)  =  U5_gag(x2, x3)
U2_AGG(x1, x2, x3, x4)  =  U2_AGG(x2, x3, x4)
REM_IN_AGG(x1, x2, x3)  =  REM_IN_AGG(x2, x3)
U1_AGG(x1, x2, x3, x4)  =  U1_AGG(x2, x3, x4)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

U1_AGG(X, Y, R, notZero_out_g(Y)) → U2_AGG(X, Y, R, sub_in_aga(X, Y, Z))
U2_AGG(X, Y, R, sub_out_aga(X, Y, Z)) → REM_IN_AGG(Z, Y, R)
REM_IN_AGG(X, Y, R) → U1_AGG(X, Y, R, notZero_in_g(Y))

The TRS R consists of the following rules:

sub_in_aga(s(X), s(Y), Z) → U6_aga(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aga(X, 0, X) → sub_out_aga(X, 0, X)
notZero_in_g(s(X)) → notZero_out_g(s(X))
U6_aga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aga(s(X), s(Y), Z)
sub_in_aaa(s(X), s(Y), Z) → U6_aaa(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(X, 0, X) → sub_out_aaa(X, 0, X)
U6_aaa(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aaa(s(X), s(Y), Z)

The argument filtering Pi contains the following mapping:
s(x1)  =  s
sub_in_aaa(x1, x2, x3)  =  sub_in_aaa
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
sub_out_aaa(x1, x2, x3)  =  sub_out_aaa(x2)
0  =  0
notZero_in_g(x1)  =  notZero_in_g(x1)
notZero_out_g(x1)  =  notZero_out_g
sub_in_aga(x1, x2, x3)  =  sub_in_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
sub_out_aga(x1, x2, x3)  =  sub_out_aga
U2_AGG(x1, x2, x3, x4)  =  U2_AGG(x2, x3, x4)
REM_IN_AGG(x1, x2, x3)  =  REM_IN_AGG(x2, x3)
U1_AGG(x1, x2, x3, x4)  =  U1_AGG(x2, x3, x4)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ Narrowing
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U1_AGG(Y, R, notZero_out_g) → U2_AGG(Y, R, sub_in_aga(Y))
REM_IN_AGG(Y, R) → U1_AGG(Y, R, notZero_in_g(Y))
U2_AGG(Y, R, sub_out_aga) → REM_IN_AGG(Y, R)

The TRS R consists of the following rules:

sub_in_aga(s) → U6_aga(sub_in_aaa)
sub_in_aga(0) → sub_out_aga
notZero_in_g(s) → notZero_out_g
U6_aga(sub_out_aaa(Y)) → sub_out_aga
sub_in_aaaU6_aaa(sub_in_aaa)
sub_in_aaasub_out_aaa(0)
U6_aaa(sub_out_aaa(Y)) → sub_out_aaa(s)

The set Q consists of the following terms:

sub_in_aga(x0)
notZero_in_g(x0)
U6_aga(x0)
sub_in_aaa
U6_aaa(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule U1_AGG(Y, R, notZero_out_g) → U2_AGG(Y, R, sub_in_aga(Y)) at position [2] we obtained the following new rules:

U1_AGG(0, y1, notZero_out_g) → U2_AGG(0, y1, sub_out_aga)
U1_AGG(s, y1, notZero_out_g) → U2_AGG(s, y1, U6_aga(sub_in_aaa))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U1_AGG(0, y1, notZero_out_g) → U2_AGG(0, y1, sub_out_aga)
REM_IN_AGG(Y, R) → U1_AGG(Y, R, notZero_in_g(Y))
U1_AGG(s, y1, notZero_out_g) → U2_AGG(s, y1, U6_aga(sub_in_aaa))
U2_AGG(Y, R, sub_out_aga) → REM_IN_AGG(Y, R)

The TRS R consists of the following rules:

sub_in_aga(s) → U6_aga(sub_in_aaa)
sub_in_aga(0) → sub_out_aga
notZero_in_g(s) → notZero_out_g
U6_aga(sub_out_aaa(Y)) → sub_out_aga
sub_in_aaaU6_aaa(sub_in_aaa)
sub_in_aaasub_out_aaa(0)
U6_aaa(sub_out_aaa(Y)) → sub_out_aaa(s)

The set Q consists of the following terms:

sub_in_aga(x0)
notZero_in_g(x0)
U6_aga(x0)
sub_in_aaa
U6_aaa(x0)

We have to consider all (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ QReductionProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U1_AGG(0, y1, notZero_out_g) → U2_AGG(0, y1, sub_out_aga)
REM_IN_AGG(Y, R) → U1_AGG(Y, R, notZero_in_g(Y))
U1_AGG(s, y1, notZero_out_g) → U2_AGG(s, y1, U6_aga(sub_in_aaa))
U2_AGG(Y, R, sub_out_aga) → REM_IN_AGG(Y, R)

The TRS R consists of the following rules:

sub_in_aaaU6_aaa(sub_in_aaa)
sub_in_aaasub_out_aaa(0)
U6_aga(sub_out_aaa(Y)) → sub_out_aga
U6_aaa(sub_out_aaa(Y)) → sub_out_aaa(s)
notZero_in_g(s) → notZero_out_g

The set Q consists of the following terms:

sub_in_aga(x0)
notZero_in_g(x0)
U6_aga(x0)
sub_in_aaa
U6_aaa(x0)

We have to consider all (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

sub_in_aga(x0)



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
QDP
                                    ↳ Narrowing
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U1_AGG(0, y1, notZero_out_g) → U2_AGG(0, y1, sub_out_aga)
REM_IN_AGG(Y, R) → U1_AGG(Y, R, notZero_in_g(Y))
U1_AGG(s, y1, notZero_out_g) → U2_AGG(s, y1, U6_aga(sub_in_aaa))
U2_AGG(Y, R, sub_out_aga) → REM_IN_AGG(Y, R)

The TRS R consists of the following rules:

sub_in_aaaU6_aaa(sub_in_aaa)
sub_in_aaasub_out_aaa(0)
U6_aga(sub_out_aaa(Y)) → sub_out_aga
U6_aaa(sub_out_aaa(Y)) → sub_out_aaa(s)
notZero_in_g(s) → notZero_out_g

The set Q consists of the following terms:

notZero_in_g(x0)
U6_aga(x0)
sub_in_aaa
U6_aaa(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule REM_IN_AGG(Y, R) → U1_AGG(Y, R, notZero_in_g(Y)) at position [2] we obtained the following new rules:

REM_IN_AGG(s, y1) → U1_AGG(s, y1, notZero_out_g)



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ Narrowing
QDP
                                        ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U1_AGG(0, y1, notZero_out_g) → U2_AGG(0, y1, sub_out_aga)
REM_IN_AGG(s, y1) → U1_AGG(s, y1, notZero_out_g)
U1_AGG(s, y1, notZero_out_g) → U2_AGG(s, y1, U6_aga(sub_in_aaa))
U2_AGG(Y, R, sub_out_aga) → REM_IN_AGG(Y, R)

The TRS R consists of the following rules:

sub_in_aaaU6_aaa(sub_in_aaa)
sub_in_aaasub_out_aaa(0)
U6_aga(sub_out_aaa(Y)) → sub_out_aga
U6_aaa(sub_out_aaa(Y)) → sub_out_aaa(s)
notZero_in_g(s) → notZero_out_g

The set Q consists of the following terms:

notZero_in_g(x0)
U6_aga(x0)
sub_in_aaa
U6_aaa(x0)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ DependencyGraphProof
QDP
                                            ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

REM_IN_AGG(s, y1) → U1_AGG(s, y1, notZero_out_g)
U1_AGG(s, y1, notZero_out_g) → U2_AGG(s, y1, U6_aga(sub_in_aaa))
U2_AGG(Y, R, sub_out_aga) → REM_IN_AGG(Y, R)

The TRS R consists of the following rules:

sub_in_aaaU6_aaa(sub_in_aaa)
sub_in_aaasub_out_aaa(0)
U6_aga(sub_out_aaa(Y)) → sub_out_aga
U6_aaa(sub_out_aaa(Y)) → sub_out_aaa(s)
notZero_in_g(s) → notZero_out_g

The set Q consists of the following terms:

notZero_in_g(x0)
U6_aga(x0)
sub_in_aaa
U6_aaa(x0)

We have to consider all (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ UsableRulesProof
QDP
                                                ↳ QReductionProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

REM_IN_AGG(s, y1) → U1_AGG(s, y1, notZero_out_g)
U1_AGG(s, y1, notZero_out_g) → U2_AGG(s, y1, U6_aga(sub_in_aaa))
U2_AGG(Y, R, sub_out_aga) → REM_IN_AGG(Y, R)

The TRS R consists of the following rules:

sub_in_aaaU6_aaa(sub_in_aaa)
sub_in_aaasub_out_aaa(0)
U6_aga(sub_out_aaa(Y)) → sub_out_aga
U6_aaa(sub_out_aaa(Y)) → sub_out_aaa(s)

The set Q consists of the following terms:

notZero_in_g(x0)
U6_aga(x0)
sub_in_aaa
U6_aaa(x0)

We have to consider all (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

notZero_in_g(x0)



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ UsableRulesProof
                                              ↳ QDP
                                                ↳ QReductionProof
QDP
                                                    ↳ Instantiation
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

REM_IN_AGG(s, y1) → U1_AGG(s, y1, notZero_out_g)
U1_AGG(s, y1, notZero_out_g) → U2_AGG(s, y1, U6_aga(sub_in_aaa))
U2_AGG(Y, R, sub_out_aga) → REM_IN_AGG(Y, R)

The TRS R consists of the following rules:

sub_in_aaaU6_aaa(sub_in_aaa)
sub_in_aaasub_out_aaa(0)
U6_aga(sub_out_aaa(Y)) → sub_out_aga
U6_aaa(sub_out_aaa(Y)) → sub_out_aaa(s)

The set Q consists of the following terms:

U6_aga(x0)
sub_in_aaa
U6_aaa(x0)

We have to consider all (P,Q,R)-chains.
By instantiating [15] the rule U2_AGG(Y, R, sub_out_aga) → REM_IN_AGG(Y, R) we obtained the following new rules:

U2_AGG(s, z0, sub_out_aga) → REM_IN_AGG(s, z0)



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ UsableRulesProof
                                              ↳ QDP
                                                ↳ QReductionProof
                                                  ↳ QDP
                                                    ↳ Instantiation
QDP
                                                        ↳ NonTerminationProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U2_AGG(s, z0, sub_out_aga) → REM_IN_AGG(s, z0)
REM_IN_AGG(s, y1) → U1_AGG(s, y1, notZero_out_g)
U1_AGG(s, y1, notZero_out_g) → U2_AGG(s, y1, U6_aga(sub_in_aaa))

The TRS R consists of the following rules:

sub_in_aaaU6_aaa(sub_in_aaa)
sub_in_aaasub_out_aaa(0)
U6_aga(sub_out_aaa(Y)) → sub_out_aga
U6_aaa(sub_out_aaa(Y)) → sub_out_aaa(s)

The set Q consists of the following terms:

U6_aga(x0)
sub_in_aaa
U6_aaa(x0)

We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

U2_AGG(s, z0, sub_out_aga) → REM_IN_AGG(s, z0)
REM_IN_AGG(s, y1) → U1_AGG(s, y1, notZero_out_g)
U1_AGG(s, y1, notZero_out_g) → U2_AGG(s, y1, U6_aga(sub_in_aaa))

The TRS R consists of the following rules:

sub_in_aaaU6_aaa(sub_in_aaa)
sub_in_aaasub_out_aaa(0)
U6_aga(sub_out_aaa(Y)) → sub_out_aga
U6_aaa(sub_out_aaa(Y)) → sub_out_aaa(s)


s = U2_AGG(s, z0, U6_aga(sub_in_aaa)) evaluates to t =U2_AGG(s, z0, U6_aga(sub_in_aaa))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

U2_AGG(s, z0, U6_aga(sub_in_aaa))U2_AGG(s, z0, U6_aga(sub_out_aaa(0)))
with rule sub_in_aaasub_out_aaa(0) at position [2,0] and matcher [ ]

U2_AGG(s, z0, U6_aga(sub_out_aaa(0)))U2_AGG(s, z0, sub_out_aga)
with rule U6_aga(sub_out_aaa(Y)) → sub_out_aga at position [2] and matcher [Y / 0]

U2_AGG(s, z0, sub_out_aga)REM_IN_AGG(s, z0)
with rule U2_AGG(s, z0', sub_out_aga) → REM_IN_AGG(s, z0') at position [] and matcher [z0' / z0]

REM_IN_AGG(s, z0)U1_AGG(s, z0, notZero_out_g)
with rule REM_IN_AGG(s, y1') → U1_AGG(s, y1', notZero_out_g) at position [] and matcher [y1' / z0]

U1_AGG(s, z0, notZero_out_g)U2_AGG(s, z0, U6_aga(sub_in_aaa))
with rule U1_AGG(s, y1, notZero_out_g) → U2_AGG(s, y1, U6_aga(sub_in_aaa))

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.




We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
rem_in: (b,f,b) (f,b,b)
sub_in: (b,b,f) (f,f,f) (f,b,f)
geq_in: (b,b) (f,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

rem_in_gag(X, Y, R) → U1_gag(X, Y, R, notZero_in_a(Y))
notZero_in_a(s(X)) → notZero_out_a(s(X))
U1_gag(X, Y, R, notZero_out_a(Y)) → U2_gag(X, Y, R, sub_in_gga(X, Y, Z))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(s(X), s(Y), Z) → U6_aaa(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(X, 0, X) → sub_out_aaa(X, 0, X)
U6_aaa(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aaa(s(X), s(Y), Z)
U6_gga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U2_gag(X, Y, R, sub_out_gga(X, Y, Z)) → U3_gag(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, R) → U1_agg(X, Y, R, notZero_in_g(Y))
notZero_in_g(s(X)) → notZero_out_g(s(X))
U1_agg(X, Y, R, notZero_out_g(Y)) → U2_agg(X, Y, R, sub_in_aga(X, Y, Z))
sub_in_aga(s(X), s(Y), Z) → U6_aga(X, Y, Z, sub_in_aaa(X, Y, Z))
U6_aga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aga(s(X), s(Y), Z)
sub_in_aga(X, 0, X) → sub_out_aga(X, 0, X)
U2_agg(X, Y, R, sub_out_aga(X, Y, Z)) → U3_agg(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, X) → U4_agg(X, Y, notZero_in_g(Y))
U4_agg(X, Y, notZero_out_g(Y)) → U5_agg(X, Y, geq_in_gg(X, Y))
geq_in_gg(s(X), s(Y)) → U7_gg(X, Y, geq_in_aa(X, Y))
geq_in_aa(s(X), s(Y)) → U7_aa(X, Y, geq_in_aa(X, Y))
geq_in_aa(X, 0) → geq_out_aa(X, 0)
U7_aa(X, Y, geq_out_aa(X, Y)) → geq_out_aa(s(X), s(Y))
U7_gg(X, Y, geq_out_aa(X, Y)) → geq_out_gg(s(X), s(Y))
geq_in_gg(X, 0) → geq_out_gg(X, 0)
U5_agg(X, Y, geq_out_gg(X, Y)) → rem_out_agg(X, Y, X)
U3_agg(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_agg(X, Y, R)
U3_gag(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_gag(X, Y, R)
rem_in_gag(X, Y, X) → U4_gag(X, Y, notZero_in_a(Y))
U4_gag(X, Y, notZero_out_a(Y)) → U5_gag(X, Y, geq_in_gg(X, Y))
U5_gag(X, Y, geq_out_gg(X, Y)) → rem_out_gag(X, Y, X)

The argument filtering Pi contains the following mapping:
rem_in_gag(x1, x2, x3)  =  rem_in_gag(x1, x3)
U1_gag(x1, x2, x3, x4)  =  U1_gag(x1, x3, x4)
notZero_in_a(x1)  =  notZero_in_a
notZero_out_a(x1)  =  notZero_out_a(x1)
s(x1)  =  s
U2_gag(x1, x2, x3, x4)  =  U2_gag(x1, x2, x3, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_in_aaa(x1, x2, x3)  =  sub_in_aaa
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
sub_out_aaa(x1, x2, x3)  =  sub_out_aaa(x2)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x1, x2)
0  =  0
U3_gag(x1, x2, x3, x4)  =  U3_gag(x1, x2, x3, x4)
rem_in_agg(x1, x2, x3)  =  rem_in_agg(x2, x3)
U1_agg(x1, x2, x3, x4)  =  U1_agg(x2, x3, x4)
notZero_in_g(x1)  =  notZero_in_g(x1)
notZero_out_g(x1)  =  notZero_out_g(x1)
U2_agg(x1, x2, x3, x4)  =  U2_agg(x2, x3, x4)
sub_in_aga(x1, x2, x3)  =  sub_in_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
sub_out_aga(x1, x2, x3)  =  sub_out_aga(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
U4_agg(x1, x2, x3)  =  U4_agg(x1, x2, x3)
U5_agg(x1, x2, x3)  =  U5_agg(x1, x2, x3)
geq_in_gg(x1, x2)  =  geq_in_gg(x1, x2)
U7_gg(x1, x2, x3)  =  U7_gg(x3)
geq_in_aa(x1, x2)  =  geq_in_aa
U7_aa(x1, x2, x3)  =  U7_aa(x3)
geq_out_aa(x1, x2)  =  geq_out_aa(x2)
geq_out_gg(x1, x2)  =  geq_out_gg(x1, x2)
rem_out_agg(x1, x2, x3)  =  rem_out_agg(x2, x3)
rem_out_gag(x1, x2, x3)  =  rem_out_gag(x1, x2, x3)
U4_gag(x1, x2, x3)  =  U4_gag(x1, x3)
U5_gag(x1, x2, x3)  =  U5_gag(x1, x2, x3)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

rem_in_gag(X, Y, R) → U1_gag(X, Y, R, notZero_in_a(Y))
notZero_in_a(s(X)) → notZero_out_a(s(X))
U1_gag(X, Y, R, notZero_out_a(Y)) → U2_gag(X, Y, R, sub_in_gga(X, Y, Z))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(s(X), s(Y), Z) → U6_aaa(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(X, 0, X) → sub_out_aaa(X, 0, X)
U6_aaa(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aaa(s(X), s(Y), Z)
U6_gga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U2_gag(X, Y, R, sub_out_gga(X, Y, Z)) → U3_gag(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, R) → U1_agg(X, Y, R, notZero_in_g(Y))
notZero_in_g(s(X)) → notZero_out_g(s(X))
U1_agg(X, Y, R, notZero_out_g(Y)) → U2_agg(X, Y, R, sub_in_aga(X, Y, Z))
sub_in_aga(s(X), s(Y), Z) → U6_aga(X, Y, Z, sub_in_aaa(X, Y, Z))
U6_aga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aga(s(X), s(Y), Z)
sub_in_aga(X, 0, X) → sub_out_aga(X, 0, X)
U2_agg(X, Y, R, sub_out_aga(X, Y, Z)) → U3_agg(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, X) → U4_agg(X, Y, notZero_in_g(Y))
U4_agg(X, Y, notZero_out_g(Y)) → U5_agg(X, Y, geq_in_gg(X, Y))
geq_in_gg(s(X), s(Y)) → U7_gg(X, Y, geq_in_aa(X, Y))
geq_in_aa(s(X), s(Y)) → U7_aa(X, Y, geq_in_aa(X, Y))
geq_in_aa(X, 0) → geq_out_aa(X, 0)
U7_aa(X, Y, geq_out_aa(X, Y)) → geq_out_aa(s(X), s(Y))
U7_gg(X, Y, geq_out_aa(X, Y)) → geq_out_gg(s(X), s(Y))
geq_in_gg(X, 0) → geq_out_gg(X, 0)
U5_agg(X, Y, geq_out_gg(X, Y)) → rem_out_agg(X, Y, X)
U3_agg(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_agg(X, Y, R)
U3_gag(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_gag(X, Y, R)
rem_in_gag(X, Y, X) → U4_gag(X, Y, notZero_in_a(Y))
U4_gag(X, Y, notZero_out_a(Y)) → U5_gag(X, Y, geq_in_gg(X, Y))
U5_gag(X, Y, geq_out_gg(X, Y)) → rem_out_gag(X, Y, X)

The argument filtering Pi contains the following mapping:
rem_in_gag(x1, x2, x3)  =  rem_in_gag(x1, x3)
U1_gag(x1, x2, x3, x4)  =  U1_gag(x1, x3, x4)
notZero_in_a(x1)  =  notZero_in_a
notZero_out_a(x1)  =  notZero_out_a(x1)
s(x1)  =  s
U2_gag(x1, x2, x3, x4)  =  U2_gag(x1, x2, x3, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_in_aaa(x1, x2, x3)  =  sub_in_aaa
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
sub_out_aaa(x1, x2, x3)  =  sub_out_aaa(x2)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x1, x2)
0  =  0
U3_gag(x1, x2, x3, x4)  =  U3_gag(x1, x2, x3, x4)
rem_in_agg(x1, x2, x3)  =  rem_in_agg(x2, x3)
U1_agg(x1, x2, x3, x4)  =  U1_agg(x2, x3, x4)
notZero_in_g(x1)  =  notZero_in_g(x1)
notZero_out_g(x1)  =  notZero_out_g(x1)
U2_agg(x1, x2, x3, x4)  =  U2_agg(x2, x3, x4)
sub_in_aga(x1, x2, x3)  =  sub_in_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
sub_out_aga(x1, x2, x3)  =  sub_out_aga(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
U4_agg(x1, x2, x3)  =  U4_agg(x1, x2, x3)
U5_agg(x1, x2, x3)  =  U5_agg(x1, x2, x3)
geq_in_gg(x1, x2)  =  geq_in_gg(x1, x2)
U7_gg(x1, x2, x3)  =  U7_gg(x3)
geq_in_aa(x1, x2)  =  geq_in_aa
U7_aa(x1, x2, x3)  =  U7_aa(x3)
geq_out_aa(x1, x2)  =  geq_out_aa(x2)
geq_out_gg(x1, x2)  =  geq_out_gg(x1, x2)
rem_out_agg(x1, x2, x3)  =  rem_out_agg(x2, x3)
rem_out_gag(x1, x2, x3)  =  rem_out_gag(x1, x2, x3)
U4_gag(x1, x2, x3)  =  U4_gag(x1, x3)
U5_gag(x1, x2, x3)  =  U5_gag(x1, x2, x3)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

REM_IN_GAG(X, Y, R) → U1_GAG(X, Y, R, notZero_in_a(Y))
REM_IN_GAG(X, Y, R) → NOTZERO_IN_A(Y)
U1_GAG(X, Y, R, notZero_out_a(Y)) → U2_GAG(X, Y, R, sub_in_gga(X, Y, Z))
U1_GAG(X, Y, R, notZero_out_a(Y)) → SUB_IN_GGA(X, Y, Z)
SUB_IN_GGA(s(X), s(Y), Z) → U6_GGA(X, Y, Z, sub_in_aaa(X, Y, Z))
SUB_IN_GGA(s(X), s(Y), Z) → SUB_IN_AAA(X, Y, Z)
SUB_IN_AAA(s(X), s(Y), Z) → U6_AAA(X, Y, Z, sub_in_aaa(X, Y, Z))
SUB_IN_AAA(s(X), s(Y), Z) → SUB_IN_AAA(X, Y, Z)
U2_GAG(X, Y, R, sub_out_gga(X, Y, Z)) → U3_GAG(X, Y, R, rem_in_agg(Z, Y, R))
U2_GAG(X, Y, R, sub_out_gga(X, Y, Z)) → REM_IN_AGG(Z, Y, R)
REM_IN_AGG(X, Y, R) → U1_AGG(X, Y, R, notZero_in_g(Y))
REM_IN_AGG(X, Y, R) → NOTZERO_IN_G(Y)
U1_AGG(X, Y, R, notZero_out_g(Y)) → U2_AGG(X, Y, R, sub_in_aga(X, Y, Z))
U1_AGG(X, Y, R, notZero_out_g(Y)) → SUB_IN_AGA(X, Y, Z)
SUB_IN_AGA(s(X), s(Y), Z) → U6_AGA(X, Y, Z, sub_in_aaa(X, Y, Z))
SUB_IN_AGA(s(X), s(Y), Z) → SUB_IN_AAA(X, Y, Z)
U2_AGG(X, Y, R, sub_out_aga(X, Y, Z)) → U3_AGG(X, Y, R, rem_in_agg(Z, Y, R))
U2_AGG(X, Y, R, sub_out_aga(X, Y, Z)) → REM_IN_AGG(Z, Y, R)
REM_IN_AGG(X, Y, X) → U4_AGG(X, Y, notZero_in_g(Y))
REM_IN_AGG(X, Y, X) → NOTZERO_IN_G(Y)
U4_AGG(X, Y, notZero_out_g(Y)) → U5_AGG(X, Y, geq_in_gg(X, Y))
U4_AGG(X, Y, notZero_out_g(Y)) → GEQ_IN_GG(X, Y)
GEQ_IN_GG(s(X), s(Y)) → U7_GG(X, Y, geq_in_aa(X, Y))
GEQ_IN_GG(s(X), s(Y)) → GEQ_IN_AA(X, Y)
GEQ_IN_AA(s(X), s(Y)) → U7_AA(X, Y, geq_in_aa(X, Y))
GEQ_IN_AA(s(X), s(Y)) → GEQ_IN_AA(X, Y)
REM_IN_GAG(X, Y, X) → U4_GAG(X, Y, notZero_in_a(Y))
REM_IN_GAG(X, Y, X) → NOTZERO_IN_A(Y)
U4_GAG(X, Y, notZero_out_a(Y)) → U5_GAG(X, Y, geq_in_gg(X, Y))
U4_GAG(X, Y, notZero_out_a(Y)) → GEQ_IN_GG(X, Y)

The TRS R consists of the following rules:

rem_in_gag(X, Y, R) → U1_gag(X, Y, R, notZero_in_a(Y))
notZero_in_a(s(X)) → notZero_out_a(s(X))
U1_gag(X, Y, R, notZero_out_a(Y)) → U2_gag(X, Y, R, sub_in_gga(X, Y, Z))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(s(X), s(Y), Z) → U6_aaa(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(X, 0, X) → sub_out_aaa(X, 0, X)
U6_aaa(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aaa(s(X), s(Y), Z)
U6_gga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U2_gag(X, Y, R, sub_out_gga(X, Y, Z)) → U3_gag(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, R) → U1_agg(X, Y, R, notZero_in_g(Y))
notZero_in_g(s(X)) → notZero_out_g(s(X))
U1_agg(X, Y, R, notZero_out_g(Y)) → U2_agg(X, Y, R, sub_in_aga(X, Y, Z))
sub_in_aga(s(X), s(Y), Z) → U6_aga(X, Y, Z, sub_in_aaa(X, Y, Z))
U6_aga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aga(s(X), s(Y), Z)
sub_in_aga(X, 0, X) → sub_out_aga(X, 0, X)
U2_agg(X, Y, R, sub_out_aga(X, Y, Z)) → U3_agg(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, X) → U4_agg(X, Y, notZero_in_g(Y))
U4_agg(X, Y, notZero_out_g(Y)) → U5_agg(X, Y, geq_in_gg(X, Y))
geq_in_gg(s(X), s(Y)) → U7_gg(X, Y, geq_in_aa(X, Y))
geq_in_aa(s(X), s(Y)) → U7_aa(X, Y, geq_in_aa(X, Y))
geq_in_aa(X, 0) → geq_out_aa(X, 0)
U7_aa(X, Y, geq_out_aa(X, Y)) → geq_out_aa(s(X), s(Y))
U7_gg(X, Y, geq_out_aa(X, Y)) → geq_out_gg(s(X), s(Y))
geq_in_gg(X, 0) → geq_out_gg(X, 0)
U5_agg(X, Y, geq_out_gg(X, Y)) → rem_out_agg(X, Y, X)
U3_agg(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_agg(X, Y, R)
U3_gag(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_gag(X, Y, R)
rem_in_gag(X, Y, X) → U4_gag(X, Y, notZero_in_a(Y))
U4_gag(X, Y, notZero_out_a(Y)) → U5_gag(X, Y, geq_in_gg(X, Y))
U5_gag(X, Y, geq_out_gg(X, Y)) → rem_out_gag(X, Y, X)

The argument filtering Pi contains the following mapping:
rem_in_gag(x1, x2, x3)  =  rem_in_gag(x1, x3)
U1_gag(x1, x2, x3, x4)  =  U1_gag(x1, x3, x4)
notZero_in_a(x1)  =  notZero_in_a
notZero_out_a(x1)  =  notZero_out_a(x1)
s(x1)  =  s
U2_gag(x1, x2, x3, x4)  =  U2_gag(x1, x2, x3, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_in_aaa(x1, x2, x3)  =  sub_in_aaa
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
sub_out_aaa(x1, x2, x3)  =  sub_out_aaa(x2)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x1, x2)
0  =  0
U3_gag(x1, x2, x3, x4)  =  U3_gag(x1, x2, x3, x4)
rem_in_agg(x1, x2, x3)  =  rem_in_agg(x2, x3)
U1_agg(x1, x2, x3, x4)  =  U1_agg(x2, x3, x4)
notZero_in_g(x1)  =  notZero_in_g(x1)
notZero_out_g(x1)  =  notZero_out_g(x1)
U2_agg(x1, x2, x3, x4)  =  U2_agg(x2, x3, x4)
sub_in_aga(x1, x2, x3)  =  sub_in_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
sub_out_aga(x1, x2, x3)  =  sub_out_aga(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
U4_agg(x1, x2, x3)  =  U4_agg(x1, x2, x3)
U5_agg(x1, x2, x3)  =  U5_agg(x1, x2, x3)
geq_in_gg(x1, x2)  =  geq_in_gg(x1, x2)
U7_gg(x1, x2, x3)  =  U7_gg(x3)
geq_in_aa(x1, x2)  =  geq_in_aa
U7_aa(x1, x2, x3)  =  U7_aa(x3)
geq_out_aa(x1, x2)  =  geq_out_aa(x2)
geq_out_gg(x1, x2)  =  geq_out_gg(x1, x2)
rem_out_agg(x1, x2, x3)  =  rem_out_agg(x2, x3)
rem_out_gag(x1, x2, x3)  =  rem_out_gag(x1, x2, x3)
U4_gag(x1, x2, x3)  =  U4_gag(x1, x3)
U5_gag(x1, x2, x3)  =  U5_gag(x1, x2, x3)
U3_AGG(x1, x2, x3, x4)  =  U3_AGG(x2, x3, x4)
U4_AGG(x1, x2, x3)  =  U4_AGG(x1, x2, x3)
GEQ_IN_AA(x1, x2)  =  GEQ_IN_AA
U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x4)
U3_GAG(x1, x2, x3, x4)  =  U3_GAG(x1, x2, x3, x4)
U5_GAG(x1, x2, x3)  =  U5_GAG(x1, x2, x3)
U6_AAA(x1, x2, x3, x4)  =  U6_AAA(x4)
U2_AGG(x1, x2, x3, x4)  =  U2_AGG(x2, x3, x4)
GEQ_IN_GG(x1, x2)  =  GEQ_IN_GG(x1, x2)
SUB_IN_AGA(x1, x2, x3)  =  SUB_IN_AGA(x2)
NOTZERO_IN_A(x1)  =  NOTZERO_IN_A
REM_IN_GAG(x1, x2, x3)  =  REM_IN_GAG(x1, x3)
SUB_IN_AAA(x1, x2, x3)  =  SUB_IN_AAA
SUB_IN_GGA(x1, x2, x3)  =  SUB_IN_GGA(x1, x2)
REM_IN_AGG(x1, x2, x3)  =  REM_IN_AGG(x2, x3)
U1_AGG(x1, x2, x3, x4)  =  U1_AGG(x2, x3, x4)
U7_AA(x1, x2, x3)  =  U7_AA(x3)
U2_GAG(x1, x2, x3, x4)  =  U2_GAG(x1, x2, x3, x4)
U6_AGA(x1, x2, x3, x4)  =  U6_AGA(x4)
NOTZERO_IN_G(x1)  =  NOTZERO_IN_G(x1)
U5_AGG(x1, x2, x3)  =  U5_AGG(x1, x2, x3)
U4_GAG(x1, x2, x3)  =  U4_GAG(x1, x3)
U1_GAG(x1, x2, x3, x4)  =  U1_GAG(x1, x3, x4)
U7_GG(x1, x2, x3)  =  U7_GG(x3)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

REM_IN_GAG(X, Y, R) → U1_GAG(X, Y, R, notZero_in_a(Y))
REM_IN_GAG(X, Y, R) → NOTZERO_IN_A(Y)
U1_GAG(X, Y, R, notZero_out_a(Y)) → U2_GAG(X, Y, R, sub_in_gga(X, Y, Z))
U1_GAG(X, Y, R, notZero_out_a(Y)) → SUB_IN_GGA(X, Y, Z)
SUB_IN_GGA(s(X), s(Y), Z) → U6_GGA(X, Y, Z, sub_in_aaa(X, Y, Z))
SUB_IN_GGA(s(X), s(Y), Z) → SUB_IN_AAA(X, Y, Z)
SUB_IN_AAA(s(X), s(Y), Z) → U6_AAA(X, Y, Z, sub_in_aaa(X, Y, Z))
SUB_IN_AAA(s(X), s(Y), Z) → SUB_IN_AAA(X, Y, Z)
U2_GAG(X, Y, R, sub_out_gga(X, Y, Z)) → U3_GAG(X, Y, R, rem_in_agg(Z, Y, R))
U2_GAG(X, Y, R, sub_out_gga(X, Y, Z)) → REM_IN_AGG(Z, Y, R)
REM_IN_AGG(X, Y, R) → U1_AGG(X, Y, R, notZero_in_g(Y))
REM_IN_AGG(X, Y, R) → NOTZERO_IN_G(Y)
U1_AGG(X, Y, R, notZero_out_g(Y)) → U2_AGG(X, Y, R, sub_in_aga(X, Y, Z))
U1_AGG(X, Y, R, notZero_out_g(Y)) → SUB_IN_AGA(X, Y, Z)
SUB_IN_AGA(s(X), s(Y), Z) → U6_AGA(X, Y, Z, sub_in_aaa(X, Y, Z))
SUB_IN_AGA(s(X), s(Y), Z) → SUB_IN_AAA(X, Y, Z)
U2_AGG(X, Y, R, sub_out_aga(X, Y, Z)) → U3_AGG(X, Y, R, rem_in_agg(Z, Y, R))
U2_AGG(X, Y, R, sub_out_aga(X, Y, Z)) → REM_IN_AGG(Z, Y, R)
REM_IN_AGG(X, Y, X) → U4_AGG(X, Y, notZero_in_g(Y))
REM_IN_AGG(X, Y, X) → NOTZERO_IN_G(Y)
U4_AGG(X, Y, notZero_out_g(Y)) → U5_AGG(X, Y, geq_in_gg(X, Y))
U4_AGG(X, Y, notZero_out_g(Y)) → GEQ_IN_GG(X, Y)
GEQ_IN_GG(s(X), s(Y)) → U7_GG(X, Y, geq_in_aa(X, Y))
GEQ_IN_GG(s(X), s(Y)) → GEQ_IN_AA(X, Y)
GEQ_IN_AA(s(X), s(Y)) → U7_AA(X, Y, geq_in_aa(X, Y))
GEQ_IN_AA(s(X), s(Y)) → GEQ_IN_AA(X, Y)
REM_IN_GAG(X, Y, X) → U4_GAG(X, Y, notZero_in_a(Y))
REM_IN_GAG(X, Y, X) → NOTZERO_IN_A(Y)
U4_GAG(X, Y, notZero_out_a(Y)) → U5_GAG(X, Y, geq_in_gg(X, Y))
U4_GAG(X, Y, notZero_out_a(Y)) → GEQ_IN_GG(X, Y)

The TRS R consists of the following rules:

rem_in_gag(X, Y, R) → U1_gag(X, Y, R, notZero_in_a(Y))
notZero_in_a(s(X)) → notZero_out_a(s(X))
U1_gag(X, Y, R, notZero_out_a(Y)) → U2_gag(X, Y, R, sub_in_gga(X, Y, Z))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(s(X), s(Y), Z) → U6_aaa(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(X, 0, X) → sub_out_aaa(X, 0, X)
U6_aaa(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aaa(s(X), s(Y), Z)
U6_gga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U2_gag(X, Y, R, sub_out_gga(X, Y, Z)) → U3_gag(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, R) → U1_agg(X, Y, R, notZero_in_g(Y))
notZero_in_g(s(X)) → notZero_out_g(s(X))
U1_agg(X, Y, R, notZero_out_g(Y)) → U2_agg(X, Y, R, sub_in_aga(X, Y, Z))
sub_in_aga(s(X), s(Y), Z) → U6_aga(X, Y, Z, sub_in_aaa(X, Y, Z))
U6_aga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aga(s(X), s(Y), Z)
sub_in_aga(X, 0, X) → sub_out_aga(X, 0, X)
U2_agg(X, Y, R, sub_out_aga(X, Y, Z)) → U3_agg(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, X) → U4_agg(X, Y, notZero_in_g(Y))
U4_agg(X, Y, notZero_out_g(Y)) → U5_agg(X, Y, geq_in_gg(X, Y))
geq_in_gg(s(X), s(Y)) → U7_gg(X, Y, geq_in_aa(X, Y))
geq_in_aa(s(X), s(Y)) → U7_aa(X, Y, geq_in_aa(X, Y))
geq_in_aa(X, 0) → geq_out_aa(X, 0)
U7_aa(X, Y, geq_out_aa(X, Y)) → geq_out_aa(s(X), s(Y))
U7_gg(X, Y, geq_out_aa(X, Y)) → geq_out_gg(s(X), s(Y))
geq_in_gg(X, 0) → geq_out_gg(X, 0)
U5_agg(X, Y, geq_out_gg(X, Y)) → rem_out_agg(X, Y, X)
U3_agg(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_agg(X, Y, R)
U3_gag(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_gag(X, Y, R)
rem_in_gag(X, Y, X) → U4_gag(X, Y, notZero_in_a(Y))
U4_gag(X, Y, notZero_out_a(Y)) → U5_gag(X, Y, geq_in_gg(X, Y))
U5_gag(X, Y, geq_out_gg(X, Y)) → rem_out_gag(X, Y, X)

The argument filtering Pi contains the following mapping:
rem_in_gag(x1, x2, x3)  =  rem_in_gag(x1, x3)
U1_gag(x1, x2, x3, x4)  =  U1_gag(x1, x3, x4)
notZero_in_a(x1)  =  notZero_in_a
notZero_out_a(x1)  =  notZero_out_a(x1)
s(x1)  =  s
U2_gag(x1, x2, x3, x4)  =  U2_gag(x1, x2, x3, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_in_aaa(x1, x2, x3)  =  sub_in_aaa
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
sub_out_aaa(x1, x2, x3)  =  sub_out_aaa(x2)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x1, x2)
0  =  0
U3_gag(x1, x2, x3, x4)  =  U3_gag(x1, x2, x3, x4)
rem_in_agg(x1, x2, x3)  =  rem_in_agg(x2, x3)
U1_agg(x1, x2, x3, x4)  =  U1_agg(x2, x3, x4)
notZero_in_g(x1)  =  notZero_in_g(x1)
notZero_out_g(x1)  =  notZero_out_g(x1)
U2_agg(x1, x2, x3, x4)  =  U2_agg(x2, x3, x4)
sub_in_aga(x1, x2, x3)  =  sub_in_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
sub_out_aga(x1, x2, x3)  =  sub_out_aga(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
U4_agg(x1, x2, x3)  =  U4_agg(x1, x2, x3)
U5_agg(x1, x2, x3)  =  U5_agg(x1, x2, x3)
geq_in_gg(x1, x2)  =  geq_in_gg(x1, x2)
U7_gg(x1, x2, x3)  =  U7_gg(x3)
geq_in_aa(x1, x2)  =  geq_in_aa
U7_aa(x1, x2, x3)  =  U7_aa(x3)
geq_out_aa(x1, x2)  =  geq_out_aa(x2)
geq_out_gg(x1, x2)  =  geq_out_gg(x1, x2)
rem_out_agg(x1, x2, x3)  =  rem_out_agg(x2, x3)
rem_out_gag(x1, x2, x3)  =  rem_out_gag(x1, x2, x3)
U4_gag(x1, x2, x3)  =  U4_gag(x1, x3)
U5_gag(x1, x2, x3)  =  U5_gag(x1, x2, x3)
U3_AGG(x1, x2, x3, x4)  =  U3_AGG(x2, x3, x4)
U4_AGG(x1, x2, x3)  =  U4_AGG(x1, x2, x3)
GEQ_IN_AA(x1, x2)  =  GEQ_IN_AA
U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x4)
U3_GAG(x1, x2, x3, x4)  =  U3_GAG(x1, x2, x3, x4)
U5_GAG(x1, x2, x3)  =  U5_GAG(x1, x2, x3)
U6_AAA(x1, x2, x3, x4)  =  U6_AAA(x4)
U2_AGG(x1, x2, x3, x4)  =  U2_AGG(x2, x3, x4)
GEQ_IN_GG(x1, x2)  =  GEQ_IN_GG(x1, x2)
SUB_IN_AGA(x1, x2, x3)  =  SUB_IN_AGA(x2)
NOTZERO_IN_A(x1)  =  NOTZERO_IN_A
REM_IN_GAG(x1, x2, x3)  =  REM_IN_GAG(x1, x3)
SUB_IN_AAA(x1, x2, x3)  =  SUB_IN_AAA
SUB_IN_GGA(x1, x2, x3)  =  SUB_IN_GGA(x1, x2)
REM_IN_AGG(x1, x2, x3)  =  REM_IN_AGG(x2, x3)
U1_AGG(x1, x2, x3, x4)  =  U1_AGG(x2, x3, x4)
U7_AA(x1, x2, x3)  =  U7_AA(x3)
U2_GAG(x1, x2, x3, x4)  =  U2_GAG(x1, x2, x3, x4)
U6_AGA(x1, x2, x3, x4)  =  U6_AGA(x4)
NOTZERO_IN_G(x1)  =  NOTZERO_IN_G(x1)
U5_AGG(x1, x2, x3)  =  U5_AGG(x1, x2, x3)
U4_GAG(x1, x2, x3)  =  U4_GAG(x1, x3)
U1_GAG(x1, x2, x3, x4)  =  U1_GAG(x1, x3, x4)
U7_GG(x1, x2, x3)  =  U7_GG(x3)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 3 SCCs with 25 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

GEQ_IN_AA(s(X), s(Y)) → GEQ_IN_AA(X, Y)

The TRS R consists of the following rules:

rem_in_gag(X, Y, R) → U1_gag(X, Y, R, notZero_in_a(Y))
notZero_in_a(s(X)) → notZero_out_a(s(X))
U1_gag(X, Y, R, notZero_out_a(Y)) → U2_gag(X, Y, R, sub_in_gga(X, Y, Z))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(s(X), s(Y), Z) → U6_aaa(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(X, 0, X) → sub_out_aaa(X, 0, X)
U6_aaa(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aaa(s(X), s(Y), Z)
U6_gga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U2_gag(X, Y, R, sub_out_gga(X, Y, Z)) → U3_gag(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, R) → U1_agg(X, Y, R, notZero_in_g(Y))
notZero_in_g(s(X)) → notZero_out_g(s(X))
U1_agg(X, Y, R, notZero_out_g(Y)) → U2_agg(X, Y, R, sub_in_aga(X, Y, Z))
sub_in_aga(s(X), s(Y), Z) → U6_aga(X, Y, Z, sub_in_aaa(X, Y, Z))
U6_aga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aga(s(X), s(Y), Z)
sub_in_aga(X, 0, X) → sub_out_aga(X, 0, X)
U2_agg(X, Y, R, sub_out_aga(X, Y, Z)) → U3_agg(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, X) → U4_agg(X, Y, notZero_in_g(Y))
U4_agg(X, Y, notZero_out_g(Y)) → U5_agg(X, Y, geq_in_gg(X, Y))
geq_in_gg(s(X), s(Y)) → U7_gg(X, Y, geq_in_aa(X, Y))
geq_in_aa(s(X), s(Y)) → U7_aa(X, Y, geq_in_aa(X, Y))
geq_in_aa(X, 0) → geq_out_aa(X, 0)
U7_aa(X, Y, geq_out_aa(X, Y)) → geq_out_aa(s(X), s(Y))
U7_gg(X, Y, geq_out_aa(X, Y)) → geq_out_gg(s(X), s(Y))
geq_in_gg(X, 0) → geq_out_gg(X, 0)
U5_agg(X, Y, geq_out_gg(X, Y)) → rem_out_agg(X, Y, X)
U3_agg(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_agg(X, Y, R)
U3_gag(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_gag(X, Y, R)
rem_in_gag(X, Y, X) → U4_gag(X, Y, notZero_in_a(Y))
U4_gag(X, Y, notZero_out_a(Y)) → U5_gag(X, Y, geq_in_gg(X, Y))
U5_gag(X, Y, geq_out_gg(X, Y)) → rem_out_gag(X, Y, X)

The argument filtering Pi contains the following mapping:
rem_in_gag(x1, x2, x3)  =  rem_in_gag(x1, x3)
U1_gag(x1, x2, x3, x4)  =  U1_gag(x1, x3, x4)
notZero_in_a(x1)  =  notZero_in_a
notZero_out_a(x1)  =  notZero_out_a(x1)
s(x1)  =  s
U2_gag(x1, x2, x3, x4)  =  U2_gag(x1, x2, x3, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_in_aaa(x1, x2, x3)  =  sub_in_aaa
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
sub_out_aaa(x1, x2, x3)  =  sub_out_aaa(x2)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x1, x2)
0  =  0
U3_gag(x1, x2, x3, x4)  =  U3_gag(x1, x2, x3, x4)
rem_in_agg(x1, x2, x3)  =  rem_in_agg(x2, x3)
U1_agg(x1, x2, x3, x4)  =  U1_agg(x2, x3, x4)
notZero_in_g(x1)  =  notZero_in_g(x1)
notZero_out_g(x1)  =  notZero_out_g(x1)
U2_agg(x1, x2, x3, x4)  =  U2_agg(x2, x3, x4)
sub_in_aga(x1, x2, x3)  =  sub_in_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
sub_out_aga(x1, x2, x3)  =  sub_out_aga(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
U4_agg(x1, x2, x3)  =  U4_agg(x1, x2, x3)
U5_agg(x1, x2, x3)  =  U5_agg(x1, x2, x3)
geq_in_gg(x1, x2)  =  geq_in_gg(x1, x2)
U7_gg(x1, x2, x3)  =  U7_gg(x3)
geq_in_aa(x1, x2)  =  geq_in_aa
U7_aa(x1, x2, x3)  =  U7_aa(x3)
geq_out_aa(x1, x2)  =  geq_out_aa(x2)
geq_out_gg(x1, x2)  =  geq_out_gg(x1, x2)
rem_out_agg(x1, x2, x3)  =  rem_out_agg(x2, x3)
rem_out_gag(x1, x2, x3)  =  rem_out_gag(x1, x2, x3)
U4_gag(x1, x2, x3)  =  U4_gag(x1, x3)
U5_gag(x1, x2, x3)  =  U5_gag(x1, x2, x3)
GEQ_IN_AA(x1, x2)  =  GEQ_IN_AA

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

GEQ_IN_AA(s(X), s(Y)) → GEQ_IN_AA(X, Y)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s
GEQ_IN_AA(x1, x2)  =  GEQ_IN_AA

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

GEQ_IN_AAGEQ_IN_AA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

GEQ_IN_AAGEQ_IN_AA

The TRS R consists of the following rules:none


s = GEQ_IN_AA evaluates to t =GEQ_IN_AA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from GEQ_IN_AA to GEQ_IN_AA.





↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

SUB_IN_AAA(s(X), s(Y), Z) → SUB_IN_AAA(X, Y, Z)

The TRS R consists of the following rules:

rem_in_gag(X, Y, R) → U1_gag(X, Y, R, notZero_in_a(Y))
notZero_in_a(s(X)) → notZero_out_a(s(X))
U1_gag(X, Y, R, notZero_out_a(Y)) → U2_gag(X, Y, R, sub_in_gga(X, Y, Z))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(s(X), s(Y), Z) → U6_aaa(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(X, 0, X) → sub_out_aaa(X, 0, X)
U6_aaa(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aaa(s(X), s(Y), Z)
U6_gga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U2_gag(X, Y, R, sub_out_gga(X, Y, Z)) → U3_gag(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, R) → U1_agg(X, Y, R, notZero_in_g(Y))
notZero_in_g(s(X)) → notZero_out_g(s(X))
U1_agg(X, Y, R, notZero_out_g(Y)) → U2_agg(X, Y, R, sub_in_aga(X, Y, Z))
sub_in_aga(s(X), s(Y), Z) → U6_aga(X, Y, Z, sub_in_aaa(X, Y, Z))
U6_aga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aga(s(X), s(Y), Z)
sub_in_aga(X, 0, X) → sub_out_aga(X, 0, X)
U2_agg(X, Y, R, sub_out_aga(X, Y, Z)) → U3_agg(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, X) → U4_agg(X, Y, notZero_in_g(Y))
U4_agg(X, Y, notZero_out_g(Y)) → U5_agg(X, Y, geq_in_gg(X, Y))
geq_in_gg(s(X), s(Y)) → U7_gg(X, Y, geq_in_aa(X, Y))
geq_in_aa(s(X), s(Y)) → U7_aa(X, Y, geq_in_aa(X, Y))
geq_in_aa(X, 0) → geq_out_aa(X, 0)
U7_aa(X, Y, geq_out_aa(X, Y)) → geq_out_aa(s(X), s(Y))
U7_gg(X, Y, geq_out_aa(X, Y)) → geq_out_gg(s(X), s(Y))
geq_in_gg(X, 0) → geq_out_gg(X, 0)
U5_agg(X, Y, geq_out_gg(X, Y)) → rem_out_agg(X, Y, X)
U3_agg(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_agg(X, Y, R)
U3_gag(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_gag(X, Y, R)
rem_in_gag(X, Y, X) → U4_gag(X, Y, notZero_in_a(Y))
U4_gag(X, Y, notZero_out_a(Y)) → U5_gag(X, Y, geq_in_gg(X, Y))
U5_gag(X, Y, geq_out_gg(X, Y)) → rem_out_gag(X, Y, X)

The argument filtering Pi contains the following mapping:
rem_in_gag(x1, x2, x3)  =  rem_in_gag(x1, x3)
U1_gag(x1, x2, x3, x4)  =  U1_gag(x1, x3, x4)
notZero_in_a(x1)  =  notZero_in_a
notZero_out_a(x1)  =  notZero_out_a(x1)
s(x1)  =  s
U2_gag(x1, x2, x3, x4)  =  U2_gag(x1, x2, x3, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_in_aaa(x1, x2, x3)  =  sub_in_aaa
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
sub_out_aaa(x1, x2, x3)  =  sub_out_aaa(x2)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x1, x2)
0  =  0
U3_gag(x1, x2, x3, x4)  =  U3_gag(x1, x2, x3, x4)
rem_in_agg(x1, x2, x3)  =  rem_in_agg(x2, x3)
U1_agg(x1, x2, x3, x4)  =  U1_agg(x2, x3, x4)
notZero_in_g(x1)  =  notZero_in_g(x1)
notZero_out_g(x1)  =  notZero_out_g(x1)
U2_agg(x1, x2, x3, x4)  =  U2_agg(x2, x3, x4)
sub_in_aga(x1, x2, x3)  =  sub_in_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
sub_out_aga(x1, x2, x3)  =  sub_out_aga(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
U4_agg(x1, x2, x3)  =  U4_agg(x1, x2, x3)
U5_agg(x1, x2, x3)  =  U5_agg(x1, x2, x3)
geq_in_gg(x1, x2)  =  geq_in_gg(x1, x2)
U7_gg(x1, x2, x3)  =  U7_gg(x3)
geq_in_aa(x1, x2)  =  geq_in_aa
U7_aa(x1, x2, x3)  =  U7_aa(x3)
geq_out_aa(x1, x2)  =  geq_out_aa(x2)
geq_out_gg(x1, x2)  =  geq_out_gg(x1, x2)
rem_out_agg(x1, x2, x3)  =  rem_out_agg(x2, x3)
rem_out_gag(x1, x2, x3)  =  rem_out_gag(x1, x2, x3)
U4_gag(x1, x2, x3)  =  U4_gag(x1, x3)
U5_gag(x1, x2, x3)  =  U5_gag(x1, x2, x3)
SUB_IN_AAA(x1, x2, x3)  =  SUB_IN_AAA

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

SUB_IN_AAA(s(X), s(Y), Z) → SUB_IN_AAA(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s
SUB_IN_AAA(x1, x2, x3)  =  SUB_IN_AAA

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

SUB_IN_AAASUB_IN_AAA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

SUB_IN_AAASUB_IN_AAA

The TRS R consists of the following rules:none


s = SUB_IN_AAA evaluates to t =SUB_IN_AAA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from SUB_IN_AAA to SUB_IN_AAA.





↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

U1_AGG(X, Y, R, notZero_out_g(Y)) → U2_AGG(X, Y, R, sub_in_aga(X, Y, Z))
U2_AGG(X, Y, R, sub_out_aga(X, Y, Z)) → REM_IN_AGG(Z, Y, R)
REM_IN_AGG(X, Y, R) → U1_AGG(X, Y, R, notZero_in_g(Y))

The TRS R consists of the following rules:

rem_in_gag(X, Y, R) → U1_gag(X, Y, R, notZero_in_a(Y))
notZero_in_a(s(X)) → notZero_out_a(s(X))
U1_gag(X, Y, R, notZero_out_a(Y)) → U2_gag(X, Y, R, sub_in_gga(X, Y, Z))
sub_in_gga(s(X), s(Y), Z) → U6_gga(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(s(X), s(Y), Z) → U6_aaa(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(X, 0, X) → sub_out_aaa(X, 0, X)
U6_aaa(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aaa(s(X), s(Y), Z)
U6_gga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_gga(s(X), s(Y), Z)
sub_in_gga(X, 0, X) → sub_out_gga(X, 0, X)
U2_gag(X, Y, R, sub_out_gga(X, Y, Z)) → U3_gag(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, R) → U1_agg(X, Y, R, notZero_in_g(Y))
notZero_in_g(s(X)) → notZero_out_g(s(X))
U1_agg(X, Y, R, notZero_out_g(Y)) → U2_agg(X, Y, R, sub_in_aga(X, Y, Z))
sub_in_aga(s(X), s(Y), Z) → U6_aga(X, Y, Z, sub_in_aaa(X, Y, Z))
U6_aga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aga(s(X), s(Y), Z)
sub_in_aga(X, 0, X) → sub_out_aga(X, 0, X)
U2_agg(X, Y, R, sub_out_aga(X, Y, Z)) → U3_agg(X, Y, R, rem_in_agg(Z, Y, R))
rem_in_agg(X, Y, X) → U4_agg(X, Y, notZero_in_g(Y))
U4_agg(X, Y, notZero_out_g(Y)) → U5_agg(X, Y, geq_in_gg(X, Y))
geq_in_gg(s(X), s(Y)) → U7_gg(X, Y, geq_in_aa(X, Y))
geq_in_aa(s(X), s(Y)) → U7_aa(X, Y, geq_in_aa(X, Y))
geq_in_aa(X, 0) → geq_out_aa(X, 0)
U7_aa(X, Y, geq_out_aa(X, Y)) → geq_out_aa(s(X), s(Y))
U7_gg(X, Y, geq_out_aa(X, Y)) → geq_out_gg(s(X), s(Y))
geq_in_gg(X, 0) → geq_out_gg(X, 0)
U5_agg(X, Y, geq_out_gg(X, Y)) → rem_out_agg(X, Y, X)
U3_agg(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_agg(X, Y, R)
U3_gag(X, Y, R, rem_out_agg(Z, Y, R)) → rem_out_gag(X, Y, R)
rem_in_gag(X, Y, X) → U4_gag(X, Y, notZero_in_a(Y))
U4_gag(X, Y, notZero_out_a(Y)) → U5_gag(X, Y, geq_in_gg(X, Y))
U5_gag(X, Y, geq_out_gg(X, Y)) → rem_out_gag(X, Y, X)

The argument filtering Pi contains the following mapping:
rem_in_gag(x1, x2, x3)  =  rem_in_gag(x1, x3)
U1_gag(x1, x2, x3, x4)  =  U1_gag(x1, x3, x4)
notZero_in_a(x1)  =  notZero_in_a
notZero_out_a(x1)  =  notZero_out_a(x1)
s(x1)  =  s
U2_gag(x1, x2, x3, x4)  =  U2_gag(x1, x2, x3, x4)
sub_in_gga(x1, x2, x3)  =  sub_in_gga(x1, x2)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
sub_in_aaa(x1, x2, x3)  =  sub_in_aaa
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
sub_out_aaa(x1, x2, x3)  =  sub_out_aaa(x2)
sub_out_gga(x1, x2, x3)  =  sub_out_gga(x1, x2)
0  =  0
U3_gag(x1, x2, x3, x4)  =  U3_gag(x1, x2, x3, x4)
rem_in_agg(x1, x2, x3)  =  rem_in_agg(x2, x3)
U1_agg(x1, x2, x3, x4)  =  U1_agg(x2, x3, x4)
notZero_in_g(x1)  =  notZero_in_g(x1)
notZero_out_g(x1)  =  notZero_out_g(x1)
U2_agg(x1, x2, x3, x4)  =  U2_agg(x2, x3, x4)
sub_in_aga(x1, x2, x3)  =  sub_in_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
sub_out_aga(x1, x2, x3)  =  sub_out_aga(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
U4_agg(x1, x2, x3)  =  U4_agg(x1, x2, x3)
U5_agg(x1, x2, x3)  =  U5_agg(x1, x2, x3)
geq_in_gg(x1, x2)  =  geq_in_gg(x1, x2)
U7_gg(x1, x2, x3)  =  U7_gg(x3)
geq_in_aa(x1, x2)  =  geq_in_aa
U7_aa(x1, x2, x3)  =  U7_aa(x3)
geq_out_aa(x1, x2)  =  geq_out_aa(x2)
geq_out_gg(x1, x2)  =  geq_out_gg(x1, x2)
rem_out_agg(x1, x2, x3)  =  rem_out_agg(x2, x3)
rem_out_gag(x1, x2, x3)  =  rem_out_gag(x1, x2, x3)
U4_gag(x1, x2, x3)  =  U4_gag(x1, x3)
U5_gag(x1, x2, x3)  =  U5_gag(x1, x2, x3)
U2_AGG(x1, x2, x3, x4)  =  U2_AGG(x2, x3, x4)
REM_IN_AGG(x1, x2, x3)  =  REM_IN_AGG(x2, x3)
U1_AGG(x1, x2, x3, x4)  =  U1_AGG(x2, x3, x4)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

U1_AGG(X, Y, R, notZero_out_g(Y)) → U2_AGG(X, Y, R, sub_in_aga(X, Y, Z))
U2_AGG(X, Y, R, sub_out_aga(X, Y, Z)) → REM_IN_AGG(Z, Y, R)
REM_IN_AGG(X, Y, R) → U1_AGG(X, Y, R, notZero_in_g(Y))

The TRS R consists of the following rules:

sub_in_aga(s(X), s(Y), Z) → U6_aga(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aga(X, 0, X) → sub_out_aga(X, 0, X)
notZero_in_g(s(X)) → notZero_out_g(s(X))
U6_aga(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aga(s(X), s(Y), Z)
sub_in_aaa(s(X), s(Y), Z) → U6_aaa(X, Y, Z, sub_in_aaa(X, Y, Z))
sub_in_aaa(X, 0, X) → sub_out_aaa(X, 0, X)
U6_aaa(X, Y, Z, sub_out_aaa(X, Y, Z)) → sub_out_aaa(s(X), s(Y), Z)

The argument filtering Pi contains the following mapping:
s(x1)  =  s
sub_in_aaa(x1, x2, x3)  =  sub_in_aaa
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
sub_out_aaa(x1, x2, x3)  =  sub_out_aaa(x2)
0  =  0
notZero_in_g(x1)  =  notZero_in_g(x1)
notZero_out_g(x1)  =  notZero_out_g(x1)
sub_in_aga(x1, x2, x3)  =  sub_in_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
sub_out_aga(x1, x2, x3)  =  sub_out_aga(x2)
U2_AGG(x1, x2, x3, x4)  =  U2_AGG(x2, x3, x4)
REM_IN_AGG(x1, x2, x3)  =  REM_IN_AGG(x2, x3)
U1_AGG(x1, x2, x3, x4)  =  U1_AGG(x2, x3, x4)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

U1_AGG(Y, R, notZero_out_g(Y)) → U2_AGG(Y, R, sub_in_aga(Y))
REM_IN_AGG(Y, R) → U1_AGG(Y, R, notZero_in_g(Y))
U2_AGG(Y, R, sub_out_aga(Y)) → REM_IN_AGG(Y, R)

The TRS R consists of the following rules:

sub_in_aga(s) → U6_aga(sub_in_aaa)
sub_in_aga(0) → sub_out_aga(0)
notZero_in_g(s) → notZero_out_g(s)
U6_aga(sub_out_aaa(Y)) → sub_out_aga(s)
sub_in_aaaU6_aaa(sub_in_aaa)
sub_in_aaasub_out_aaa(0)
U6_aaa(sub_out_aaa(Y)) → sub_out_aaa(s)

The set Q consists of the following terms:

sub_in_aga(x0)
notZero_in_g(x0)
U6_aga(x0)
sub_in_aaa
U6_aaa(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule U1_AGG(Y, R, notZero_out_g(Y)) → U2_AGG(Y, R, sub_in_aga(Y)) at position [2] we obtained the following new rules:

U1_AGG(0, y1, notZero_out_g(0)) → U2_AGG(0, y1, sub_out_aga(0))
U1_AGG(s, y1, notZero_out_g(s)) → U2_AGG(s, y1, U6_aga(sub_in_aaa))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

U1_AGG(s, y1, notZero_out_g(s)) → U2_AGG(s, y1, U6_aga(sub_in_aaa))
U1_AGG(0, y1, notZero_out_g(0)) → U2_AGG(0, y1, sub_out_aga(0))
REM_IN_AGG(Y, R) → U1_AGG(Y, R, notZero_in_g(Y))
U2_AGG(Y, R, sub_out_aga(Y)) → REM_IN_AGG(Y, R)

The TRS R consists of the following rules:

sub_in_aga(s) → U6_aga(sub_in_aaa)
sub_in_aga(0) → sub_out_aga(0)
notZero_in_g(s) → notZero_out_g(s)
U6_aga(sub_out_aaa(Y)) → sub_out_aga(s)
sub_in_aaaU6_aaa(sub_in_aaa)
sub_in_aaasub_out_aaa(0)
U6_aaa(sub_out_aaa(Y)) → sub_out_aaa(s)

The set Q consists of the following terms:

sub_in_aga(x0)
notZero_in_g(x0)
U6_aga(x0)
sub_in_aaa
U6_aaa(x0)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
QDP
                                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

U1_AGG(s, y1, notZero_out_g(s)) → U2_AGG(s, y1, U6_aga(sub_in_aaa))
REM_IN_AGG(Y, R) → U1_AGG(Y, R, notZero_in_g(Y))
U2_AGG(Y, R, sub_out_aga(Y)) → REM_IN_AGG(Y, R)

The TRS R consists of the following rules:

sub_in_aga(s) → U6_aga(sub_in_aaa)
sub_in_aga(0) → sub_out_aga(0)
notZero_in_g(s) → notZero_out_g(s)
U6_aga(sub_out_aaa(Y)) → sub_out_aga(s)
sub_in_aaaU6_aaa(sub_in_aaa)
sub_in_aaasub_out_aaa(0)
U6_aaa(sub_out_aaa(Y)) → sub_out_aaa(s)

The set Q consists of the following terms:

sub_in_aga(x0)
notZero_in_g(x0)
U6_aga(x0)
sub_in_aaa
U6_aaa(x0)

We have to consider all (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
QDP
                                    ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

U1_AGG(s, y1, notZero_out_g(s)) → U2_AGG(s, y1, U6_aga(sub_in_aaa))
REM_IN_AGG(Y, R) → U1_AGG(Y, R, notZero_in_g(Y))
U2_AGG(Y, R, sub_out_aga(Y)) → REM_IN_AGG(Y, R)

The TRS R consists of the following rules:

sub_in_aaaU6_aaa(sub_in_aaa)
sub_in_aaasub_out_aaa(0)
U6_aga(sub_out_aaa(Y)) → sub_out_aga(s)
U6_aaa(sub_out_aaa(Y)) → sub_out_aaa(s)
notZero_in_g(s) → notZero_out_g(s)

The set Q consists of the following terms:

sub_in_aga(x0)
notZero_in_g(x0)
U6_aga(x0)
sub_in_aaa
U6_aaa(x0)

We have to consider all (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

sub_in_aga(x0)



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
QDP
                                        ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

REM_IN_AGG(Y, R) → U1_AGG(Y, R, notZero_in_g(Y))
U1_AGG(s, y1, notZero_out_g(s)) → U2_AGG(s, y1, U6_aga(sub_in_aaa))
U2_AGG(Y, R, sub_out_aga(Y)) → REM_IN_AGG(Y, R)

The TRS R consists of the following rules:

sub_in_aaaU6_aaa(sub_in_aaa)
sub_in_aaasub_out_aaa(0)
U6_aga(sub_out_aaa(Y)) → sub_out_aga(s)
U6_aaa(sub_out_aaa(Y)) → sub_out_aaa(s)
notZero_in_g(s) → notZero_out_g(s)

The set Q consists of the following terms:

notZero_in_g(x0)
U6_aga(x0)
sub_in_aaa
U6_aaa(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule REM_IN_AGG(Y, R) → U1_AGG(Y, R, notZero_in_g(Y)) at position [2] we obtained the following new rules:

REM_IN_AGG(s, y1) → U1_AGG(s, y1, notZero_out_g(s))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
QDP
                                            ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

REM_IN_AGG(s, y1) → U1_AGG(s, y1, notZero_out_g(s))
U1_AGG(s, y1, notZero_out_g(s)) → U2_AGG(s, y1, U6_aga(sub_in_aaa))
U2_AGG(Y, R, sub_out_aga(Y)) → REM_IN_AGG(Y, R)

The TRS R consists of the following rules:

sub_in_aaaU6_aaa(sub_in_aaa)
sub_in_aaasub_out_aaa(0)
U6_aga(sub_out_aaa(Y)) → sub_out_aga(s)
U6_aaa(sub_out_aaa(Y)) → sub_out_aaa(s)
notZero_in_g(s) → notZero_out_g(s)

The set Q consists of the following terms:

notZero_in_g(x0)
U6_aga(x0)
sub_in_aaa
U6_aaa(x0)

We have to consider all (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ UsableRulesProof
QDP
                                                ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

REM_IN_AGG(s, y1) → U1_AGG(s, y1, notZero_out_g(s))
U1_AGG(s, y1, notZero_out_g(s)) → U2_AGG(s, y1, U6_aga(sub_in_aaa))
U2_AGG(Y, R, sub_out_aga(Y)) → REM_IN_AGG(Y, R)

The TRS R consists of the following rules:

sub_in_aaaU6_aaa(sub_in_aaa)
sub_in_aaasub_out_aaa(0)
U6_aga(sub_out_aaa(Y)) → sub_out_aga(s)
U6_aaa(sub_out_aaa(Y)) → sub_out_aaa(s)

The set Q consists of the following terms:

notZero_in_g(x0)
U6_aga(x0)
sub_in_aaa
U6_aaa(x0)

We have to consider all (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

notZero_in_g(x0)



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ UsableRulesProof
                                              ↳ QDP
                                                ↳ QReductionProof
QDP
                                                    ↳ Instantiation

Q DP problem:
The TRS P consists of the following rules:

REM_IN_AGG(s, y1) → U1_AGG(s, y1, notZero_out_g(s))
U1_AGG(s, y1, notZero_out_g(s)) → U2_AGG(s, y1, U6_aga(sub_in_aaa))
U2_AGG(Y, R, sub_out_aga(Y)) → REM_IN_AGG(Y, R)

The TRS R consists of the following rules:

sub_in_aaaU6_aaa(sub_in_aaa)
sub_in_aaasub_out_aaa(0)
U6_aga(sub_out_aaa(Y)) → sub_out_aga(s)
U6_aaa(sub_out_aaa(Y)) → sub_out_aaa(s)

The set Q consists of the following terms:

U6_aga(x0)
sub_in_aaa
U6_aaa(x0)

We have to consider all (P,Q,R)-chains.
By instantiating [15] the rule U2_AGG(Y, R, sub_out_aga(Y)) → REM_IN_AGG(Y, R) we obtained the following new rules:

U2_AGG(s, z0, sub_out_aga(s)) → REM_IN_AGG(s, z0)



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ UsableRulesProof
                                              ↳ QDP
                                                ↳ QReductionProof
                                                  ↳ QDP
                                                    ↳ Instantiation
QDP
                                                        ↳ NonTerminationProof

Q DP problem:
The TRS P consists of the following rules:

REM_IN_AGG(s, y1) → U1_AGG(s, y1, notZero_out_g(s))
U2_AGG(s, z0, sub_out_aga(s)) → REM_IN_AGG(s, z0)
U1_AGG(s, y1, notZero_out_g(s)) → U2_AGG(s, y1, U6_aga(sub_in_aaa))

The TRS R consists of the following rules:

sub_in_aaaU6_aaa(sub_in_aaa)
sub_in_aaasub_out_aaa(0)
U6_aga(sub_out_aaa(Y)) → sub_out_aga(s)
U6_aaa(sub_out_aaa(Y)) → sub_out_aaa(s)

The set Q consists of the following terms:

U6_aga(x0)
sub_in_aaa
U6_aaa(x0)

We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

REM_IN_AGG(s, y1) → U1_AGG(s, y1, notZero_out_g(s))
U2_AGG(s, z0, sub_out_aga(s)) → REM_IN_AGG(s, z0)
U1_AGG(s, y1, notZero_out_g(s)) → U2_AGG(s, y1, U6_aga(sub_in_aaa))

The TRS R consists of the following rules:

sub_in_aaaU6_aaa(sub_in_aaa)
sub_in_aaasub_out_aaa(0)
U6_aga(sub_out_aaa(Y)) → sub_out_aga(s)
U6_aaa(sub_out_aaa(Y)) → sub_out_aaa(s)


s = U2_AGG(s, z0, U6_aga(sub_in_aaa)) evaluates to t =U2_AGG(s, z0, U6_aga(sub_in_aaa))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

U2_AGG(s, z0, U6_aga(sub_in_aaa))U2_AGG(s, z0, U6_aga(sub_out_aaa(0)))
with rule sub_in_aaasub_out_aaa(0) at position [2,0] and matcher [ ]

U2_AGG(s, z0, U6_aga(sub_out_aaa(0)))U2_AGG(s, z0, sub_out_aga(s))
with rule U6_aga(sub_out_aaa(Y)) → sub_out_aga(s) at position [2] and matcher [Y / 0]

U2_AGG(s, z0, sub_out_aga(s))REM_IN_AGG(s, z0)
with rule U2_AGG(s, z0', sub_out_aga(s)) → REM_IN_AGG(s, z0') at position [] and matcher [z0' / z0]

REM_IN_AGG(s, z0)U1_AGG(s, z0, notZero_out_g(s))
with rule REM_IN_AGG(s, y1') → U1_AGG(s, y1', notZero_out_g(s)) at position [] and matcher [y1' / z0]

U1_AGG(s, z0, notZero_out_g(s))U2_AGG(s, z0, U6_aga(sub_in_aaa))
with rule U1_AGG(s, y1, notZero_out_g(s)) → U2_AGG(s, y1, U6_aga(sub_in_aaa))

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.